Merge pull request #3213 from Safelite/nation/CASH-940

CASH-940 added save progress modal
This commit is contained in:
CarlNation 2026-06-08 08:58:19 -04:00 committed by GitHub
commit af1cd602a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -112,6 +112,14 @@
maxLength="5"
validationRules="zip-code-required|zip-code-format" />
<hr class="mb-5" />
<saveProgressModalQuestion
modalWidgetName="SaveProgressModalWidget"
modalName="SaveProgressModal"
v-if="showSaveProgressModal"
pageName="insurance-details" />
<navbar
cmsWidgetName="FunnelFooterWidget"
ref="navbar"
@ -141,6 +149,7 @@ import { settleAllPromises } from "@/helpers/layout-helper";
import { stateOptions } from "@/constants/state-options";
import { regex } from "@/helpers/validation-rules";
import { NON_MANAGED_SHOW_CLAIM_NUMBER_PARENTS } from "@/constants/insurance";
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
// DEFINE VALIDATION RULES
defineRule(
@ -171,6 +180,7 @@ export default {
policyState: this.getPolicyStateFromStore(),
policyZip: this.getPolicyZipFromStore(),
claimNumber: this.getClaimNumberFromStore(),
showSaveProgressModal: null,
};
},
components: {
@ -182,6 +192,7 @@ export default {
datePickerPopup,
dropdownQuestion,
textBlock,
saveProgressModalQuestion,
},
// Ensure CMS content is fetched during route navigation without depending on `to`/`from`
async beforeRouteEnter(to, from, next) {
@ -194,8 +205,11 @@ export default {
},
];
const resultMap = await settleAllPromises(promiseResultMap);
const emailFromStore = store.getters.order.customer.emailAddress;
const showSaveProgressModal = !(emailFromStore?.length > 0);
next((vm) => {
vm.setCmsContent(resultMap.cmsContent);
vm.showSaveProgressModal = showSaveProgressModal;
});
},