CASH-79: conditionally show save progress based on email address in store
This commit is contained in:
parent
ca5939d1ef
commit
9d0322081c
2 changed files with 9 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@
|
|||
:index="currentGlassIndex">
|
||||
|
||||
<!-- save progress goes into <slot> on questions-page-layout -->
|
||||
<saveProgressModalQuestion modalWidgetName="SaveProgressModalWidget" />
|
||||
<saveProgressModalQuestion
|
||||
modalWidgetName="SaveProgressModalWidget"
|
||||
v-if="!isEmailInStoreOnPageLoad" />
|
||||
|
||||
</questions-page-layout>
|
||||
</Form>
|
||||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue