This commit is contained in:
Leah Schumann 2023-04-21 07:12:26 -04:00
parent f0957a9bba
commit 7d0e2513be
3 changed files with 20 additions and 18 deletions

View file

@ -70,8 +70,6 @@ export default {
handler(newValue) {
if (newValue) {
this.selectedValues = "Mobile";
} else {
this.selectedValues = null;
}
},
},

View file

@ -71,7 +71,7 @@
:isDropoff="isDropoff"
:serviceZipCode="zipCode"
:selectedAppointmentType="selectedAppointmentType"
:shopQuestionInitialData="shopQuestionInitialData"
:shopQuestionData="shopQuestionData"
cmsWidgetName="ShopQuestionWidget" />
<contentGroupModal ref="RecalModal" cmsWidgetName="RecalModal" />
<funnel-footer
@ -145,9 +145,9 @@ export default {
isRecalibrationServiceableMobile: null,
mobileFeePart: null,
zipContainsMilitaryBase: false,
selectedAppointmentType: "",
selectedAppointmentType: "Dropoff",
providerNumber: null,
shopQuestionInitialData: null,
shopQuestionData: null,
selectedShop: "",
};
},
@ -162,7 +162,7 @@ export default {
const mobileFeePartPromise = getPricedMobileFeePart(serviceZipCode);
const shopQuestionInitialDataPromise = shopQuestion.methods.loadInitialData();
const shopQuestionDataPromise = shopQuestion.methods.loadData();
// Settle promises and get results
const promiseResultMap = [
@ -183,8 +183,8 @@ export default {
promise: getZipCodeData,
},
{
resultKey: "shopQuestionInitialData",
promise: shopQuestionInitialDataPromise,
resultKey: "shopQuestionData",
promise: shopQuestionDataPromise,
},
];
@ -197,7 +197,7 @@ export default {
resultMap.zipCodeData,
resultMap.serviceabilityDetails,
resultMap.mobileFeePart,
resultMap.shopQuestionInitialData
resultMap.shopQuestionData
);
});
},
@ -308,7 +308,7 @@ export default {
store.getters.payment.isInsurance !== null
);
},
setData(zipCodeData, serviceabilityDetails, mobileFeePart, shopQuestionInitialData) {
setData(zipCodeData, serviceabilityDetails, mobileFeePart, shopQuestionData) {
if (zipCodeData) {
this.zipContainsMilitaryBase = zipCodeData.containsMilitaryBase;
}
@ -321,8 +321,8 @@ export default {
this.mobileFeePart = mobileFeePart;
}
if (shopQuestionInitialData) {
this.shopQuestionInitialData = shopQuestionInitialData;
if (shopQuestionData) {
this.shopQuestionData = shopQuestionData;
}
},
setContainsMilitaryBase(val) {

View file

@ -71,7 +71,7 @@ export default {
serviceZipCode: String,
selectedAppointmentType: String,
cmsWidgetName: String,
shopQuestionInitialData: {
shopQuestionData: {
type: Object,
required: true,
},
@ -102,7 +102,7 @@ export default {
},
},
methods: {
loadInitialData() {
loadData() {
return baseMixin.methods.dispatchStoreAction(storeActions.GET_PROVIDER_LOCATIONS, {
serviceZipCode: this.serviceZipCode,
});
@ -162,12 +162,17 @@ export default {
this.shopIndex = 0;
this.getNextShopsFromList();
this.displaySeeMoreLocationsLink = true;
this.displaySeeMoreLocationsLink = true;
this.selectedValue = "";
this.$refs.buttonQuestion.resetField();
},
},
mounted() {
console.log(this.shopQuestionData)
this.shops = this.shopQuestionData;
this.getNextShopsFromList()
console.log(this.shops)
},
watch: {
serviceZipCode: {
async handler() {
@ -177,7 +182,7 @@ export default {
selectedAppointmentType: {
async handler(newValue, oldValue) {
if (oldValue == undefined) {
this.shops = this.shopQuestionInitialData;
this.shops = this.shopQuestionData;
this.getNextShopsFromList();
this.displaySeeMoreLocationsLink = true;
return;
@ -192,7 +197,6 @@ export default {
this.resetShopList();
},
immediate: true,
},
},
};