diff --git a/src/helpers/heritage-integration/navigation-helper.js b/src/helpers/heritage-integration/navigation-helper.js index 5d02f5dc6..6d2b98e90 100644 --- a/src/helpers/heritage-integration/navigation-helper.js +++ b/src/helpers/heritage-integration/navigation-helper.js @@ -74,16 +74,7 @@ async function getLatestPageForRedirection() { fmgPageValues.CAPABILITY_QUESTIONS ); - const vinOptionalVehiclePromise = store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); - const promiseResultMap = [ - { - resultKey: "vinOptionalOptions", - promise: vinOptionalVehiclePromise, - }, - ]; - const resultMap = await settleAllPromises(promiseResultMap); - - var isVinOptionalVehicle = resultMap.vinOptionalOptions; + const isVinOptionalVehicle = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); if (!vehicleMakeComponent.methods.arePagePrerequisitesValid()) { return fmgPageValues.VEHICLE_YEAR; diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 92913e75a..9406db0d9 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -120,7 +120,7 @@ export default { name: "estimate", data() { return { - selectedVinLookupMethod: null, + selectedVinLookupMethod: "", serviceZipCode: this.getZipFromStore(), emailAddress: this.getEmailFromStore(), displayInvalidZipAlert: false, @@ -132,7 +132,6 @@ export default { async beforeRouteEnter(to, from, next) { //Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); - const vinOptionalVehiclePromise = store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); //Settle promises and get results const promiseResultMap = [ @@ -140,15 +139,13 @@ export default { resultKey: "cmsContent", promise: cmsContentPromise, }, - { - resultKey: "vinOptionalOptions", - promise: vinOptionalVehiclePromise, - }, ]; const resultMap = await settleAllPromises(promiseResultMap); + const isVinOptionalVehicle = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE); + next((vm) => { - vm.isVinOptionalVehicle = resultMap.vinOptionalOptions; + vm.isVinOptionalVehicle = isVinOptionalVehicle; if (resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.includes("|")) { const forwardTextOption = resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.split("|");