From 9d0322081c8b1b9488192ea32b3b680ebdd7d79b Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 13 Jan 2025 12:53:04 -0500 Subject: [PATCH] CASH-79: conditionally show save progress based on email address in store --- .../save-progress-modal-question.vue | 2 ++ src/layouts/part-questions/part-questions.vue | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue b/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue index 7df928ac8..d462e8309 100644 --- a/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue +++ b/src/fmg-components/save-progress-modal-question/save-progress-modal-question.vue @@ -86,6 +86,8 @@ export default { // hide save progress button; show success message alert this.isProgressSaved = true; + this.modal.closeModal(); + // TODO send store call to send to new API (that triggers an email send) // TODO hide button trigger and replace with success message diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index 2c9e2c32c..5d146fbef 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -15,7 +15,9 @@ :index="currentGlassIndex"> - + @@ -58,9 +60,12 @@ export default { const resultMap = await settleAllPromises(promiseResultMap); + const emailFromStore = store.getters.order.customer.emailAddress; + // Call the "next" function to complete the transition to this page. next(async (vm) => { vm.setCmsContent(resultMap.cmsContent); + vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0; if (store.getters.externalParameterState?.isExternalParameter) { if (store.getters.externalParameterServiceZip.zipCode) { const serviceState = store.getters.order.serviceLocation.state; @@ -84,6 +89,7 @@ export default { questionsData: null, selectedAnswers: {}, currentGlassIndex: 0, + isEmailInStoreOnPageLoad: null, }; }, computed: {