CASH-489 fixed email modal popping up when user has clicked skip and navigates back to quote page
This commit is contained in:
Johnny shultz 2025-04-10 10:18:52 -04:00
parent d11cc256e1
commit f0cfe5c0de
2 changed files with 15 additions and 3 deletions

View file

@ -166,6 +166,7 @@ import {
getDeviceIdValue, getDeviceIdValue,
} from "@/helpers/heritage-integration/cookie-helper"; } from "@/helpers/heritage-integration/cookie-helper";
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper"; import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
@ -242,7 +243,9 @@ export default {
const resultMap = await settleAllPromises(promiseResultMap); const resultMap = await settleAllPromises(promiseResultMap);
const emailFromStore = store.getters.order.customer.emailAddress; const emailFromStore = store.getters.order.customer.emailAddress;
const isEmailInStoreOnPageLoad = emailFromStore?.length > 0; const isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
const showSaveProgressPopup = isEmailInStoreOnPageLoad ? false : true; const isPopupSkipped =
store.getters.pageData(fmgPageValues.QUOTE).saveProgressPopupSkipped === true;
const showSaveProgressPopup = isEmailInStoreOnPageLoad || isPopupSkipped ? false : true;
const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true; const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true;
const shouldSkipToInsurance = const shouldSkipToInsurance =
getBoolFromString( getBoolFromString(
@ -626,6 +629,15 @@ export default {
async closeSaveProgressPopup() { async closeSaveProgressPopup() {
this.showSaveProgressPopup = false; this.showSaveProgressPopup = false;
await this.dispatchStoreAction(
storeActions.SAVE_PAGE_DATA,
{
page: fmgPageValues.QUOTE,
data: { saveProgressPopupSkipped: true },
},
false
);
if (this.skipToInsurance) { if (this.skipToInsurance) {
// skip ahead now if in IGQ skip experiment // skip ahead now if in IGQ skip experiment
await this.skip(true, externalParamPackageLabels.GLASS_ONLY); await this.skip(true, externalParamPackageLabels.GLASS_ONLY);

View file

@ -3202,8 +3202,8 @@ export const actions = {
context.commit(storeMutations.UPDATE_CUSTOMER_WAITLIST_REQUESTED, waitListRequested); context.commit(storeMutations.UPDATE_CUSTOMER_WAITLIST_REQUESTED, waitListRequested);
}, },
savePageData(context, emailOrSms) { savePageData(context, pageData) {
context.commit(storeMutations.UPDATE_PAGE_DATA, emailOrSms); context.commit(storeMutations.UPDATE_PAGE_DATA, pageData);
}, },
saveVin(context, { isSelectedGlassAvailableForVehicle, vehicleInfo }) { saveVin(context, { isSelectedGlassAvailableForVehicle, vehicleInfo }) {