Merge pull request #843 from Safelite/rlsmerge/22.12.08-to-develop-v2

Rlsmerge/22.12.08 to develop v2
This commit is contained in:
CarlNation 2022-11-30 08:29:49 -05:00 committed by GitHub
commit d3c4cb5c29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 16 deletions

View file

@ -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;

View file

@ -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("|");