commit
8356a2b23b
2 changed files with 3 additions and 16 deletions
|
|
@ -75,16 +75,7 @@ async function getLatestPageForRedirection() {
|
||||||
const moldingQuestionsComponent = await getLazyLoadedComponent(fmgPageValues.MOLDING_QUESTIONS);
|
const moldingQuestionsComponent = await getLazyLoadedComponent(fmgPageValues.MOLDING_QUESTIONS);
|
||||||
const capabilityQuestionsComponent = await getLazyLoadedComponent(fmgPageValues.CAPABILITY_QUESTIONS);
|
const capabilityQuestionsComponent = await getLazyLoadedComponent(fmgPageValues.CAPABILITY_QUESTIONS);
|
||||||
|
|
||||||
const vinOptionalVehiclePromise = store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
const isVinOptionalVehicle = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
||||||
const promiseResultMap = [
|
|
||||||
{
|
|
||||||
resultKey: "vinOptionalOptions",
|
|
||||||
promise: vinOptionalVehiclePromise,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
|
||||||
|
|
||||||
var isVinOptionalVehicle = resultMap.vinOptionalOptions;
|
|
||||||
|
|
||||||
if (!vehicleMakeComponent.methods.arePagePrerequisitesValid()) {
|
if (!vehicleMakeComponent.methods.arePagePrerequisitesValid()) {
|
||||||
return fmgPageValues.VEHICLE_YEAR;
|
return fmgPageValues.VEHICLE_YEAR;
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,6 @@ export default {
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
//Call APIs
|
//Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||||
const vinOptionalVehiclePromise = store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
|
||||||
|
|
||||||
//Settle promises and get results
|
//Settle promises and get results
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
|
|
@ -151,16 +150,13 @@ export default {
|
||||||
resultKey: "cmsContent",
|
resultKey: "cmsContent",
|
||||||
promise: cmsContentPromise,
|
promise: cmsContentPromise,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
resultKey: "vinOptionalOptions",
|
|
||||||
promise: vinOptionalVehiclePromise,
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
const isVinOptionalVehicle = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
||||||
|
|
||||||
next((vm) => {
|
next((vm) => {
|
||||||
vm.isVinOptionalVehicle = resultMap.vinOptionalOptions;
|
vm.isVinOptionalVehicle = isVinOptionalVehicle;
|
||||||
if (resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.includes("|"))
|
if (resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.includes("|"))
|
||||||
{
|
{
|
||||||
const forwardTextOption = resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.split("|");
|
const forwardTextOption = resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.split("|");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue