Merge pull request #2192 from Safelite/feature/CASH-77
Feature/CASH-77 - add Save Progress to /quote page
This commit is contained in:
commit
e5692e9949
3 changed files with 52 additions and 5 deletions
|
|
@ -103,6 +103,8 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.save-progress-modal-question {
|
.save-progress-modal-question {
|
||||||
order: 2;
|
order: 2;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: $blue-100;
|
background: $blue-100;
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,9 @@ store.getters = {
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
|
parentAccountNumber: applicationConfig.CASH_PARENT_ACCOUNT_NUMBER,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -136,6 +139,9 @@ afterEach(() => {
|
||||||
insuranceCoverage: {},
|
insuranceCoverage: {},
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -263,6 +269,9 @@ describe("quote.vue", () => {
|
||||||
glassParts: ["item", "item2"],
|
glassParts: ["item", "item2"],
|
||||||
},
|
},
|
||||||
payment: {},
|
payment: {},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
zipCode: "12345",
|
zipCode: "12345",
|
||||||
zipCodeCtu: "value",
|
zipCodeCtu: "value",
|
||||||
|
|
@ -309,6 +318,9 @@ describe("quote.vue", () => {
|
||||||
glassParts: ["item", "item2"],
|
glassParts: ["item", "item2"],
|
||||||
},
|
},
|
||||||
payment: {},
|
payment: {},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
zipCode: "12345",
|
zipCode: "12345",
|
||||||
zipCodeCtu: "value",
|
zipCodeCtu: "value",
|
||||||
|
|
@ -355,6 +367,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null,
|
isInsurance: null,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -396,6 +411,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null,
|
isInsurance: null,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -438,6 +456,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: true,
|
isInsurance: true,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -480,6 +501,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: false,
|
isInsurance: false,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -523,6 +547,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -568,6 +595,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
isInsurance: null, // Ensure that previous selection isn't overriding selection
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: null,
|
state: null,
|
||||||
},
|
},
|
||||||
|
|
@ -612,6 +642,9 @@ describe("quote.vue", () => {
|
||||||
payment: {
|
payment: {
|
||||||
isInsurance: null,
|
isInsurance: null,
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
state: "AZ",
|
state: "AZ",
|
||||||
},
|
},
|
||||||
|
|
@ -717,6 +750,9 @@ describe("quote.vue", () => {
|
||||||
isInsurance: true,
|
isInsurance: true,
|
||||||
inactivePromos: [],
|
inactivePromos: [],
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
emailAddress: "test@test.com",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
externalParameterState: { isExternalParameter: 1 },
|
externalParameterState: { isExternalParameter: 1 },
|
||||||
externalParameterQuote: {
|
externalParameterQuote: {
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,11 @@
|
||||||
@back-clicked="backButtonAction"
|
@back-clicked="backButtonAction"
|
||||||
@ForwardClicked="forwardButtonAction" />
|
@ForwardClicked="forwardButtonAction" />
|
||||||
|
|
||||||
|
<saveProgressModalQuestion
|
||||||
|
modalWidgetName="SaveProgressModalWidget"
|
||||||
|
v-if="!isEmailInStoreOnPageLoad"
|
||||||
|
@save-progress="saveProgress" />
|
||||||
|
|
||||||
<textBlock
|
<textBlock
|
||||||
cmsWidgetName="quoteDisclaimer"
|
cmsWidgetName="quoteDisclaimer"
|
||||||
justifyText="center"
|
justifyText="center"
|
||||||
|
|
@ -84,11 +89,6 @@
|
||||||
class="mb-5 quote-disclaimer" />
|
class="mb-5 quote-disclaimer" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-6 col-xl-4">
|
|
||||||
<button @click="handleClick">Click me!</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -105,6 +105,7 @@ import contentGroupModal from "@/fmg-components/content-group-modal/content-grou
|
||||||
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
||||||
import afterpayModalBanner from "@/layouts/quote/afterpay-modal-banner/afterpay-modal-banner";
|
import afterpayModalBanner from "@/layouts/quote/afterpay-modal-banner/afterpay-modal-banner";
|
||||||
import recalDisclaimer from "@/layouts/quote/recal-disclaimer/recal-disclaimer.vue";
|
import recalDisclaimer from "@/layouts/quote/recal-disclaimer/recal-disclaimer.vue";
|
||||||
|
import saveProgressModalQuestion from "@/fmg-components/save-progress-modal-question/save-progress-modal-question";
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
|
@ -189,6 +190,8 @@ export default {
|
||||||
];
|
];
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
|
const emailFromStore = store.getters.order.customer.emailAddress;
|
||||||
|
|
||||||
const lineItems = deepClone(store.getters.order.lineItems);
|
const lineItems = deepClone(store.getters.order.lineItems);
|
||||||
lineItems.vaps = lineItems.vaps ?? [];
|
lineItems.vaps = lineItems.vaps ?? [];
|
||||||
const nullSafeGlassParts = lineItems.glassParts ?? [];
|
const nullSafeGlassParts = lineItems.glassParts ?? [];
|
||||||
|
|
@ -269,6 +272,7 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
|
vm.isEmailInStoreOnPageLoad = emailFromStore?.length > 0;
|
||||||
vm.addableVaps = addableVaps;
|
vm.addableVaps = addableVaps;
|
||||||
vm.lineItems = lineItems;
|
vm.lineItems = lineItems;
|
||||||
vm.availableLineItems = pricingResults;
|
vm.availableLineItems = pricingResults;
|
||||||
|
|
@ -415,6 +419,7 @@ export default {
|
||||||
servicePackage: null,
|
servicePackage: null,
|
||||||
holdParentAccountNumber: null,
|
holdParentAccountNumber: null,
|
||||||
holdBillToAccountNumber: null,
|
holdBillToAccountNumber: null,
|
||||||
|
isEmailInStoreOnPageLoad: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -504,6 +509,9 @@ export default {
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
vehicleQuestionsMixin.methods.navigateBack(this);
|
vehicleQuestionsMixin.methods.navigateBack(this);
|
||||||
},
|
},
|
||||||
|
saveProgress() {
|
||||||
|
saveQuote({ pageNameToLog: "quote" });
|
||||||
|
},
|
||||||
forwardButtonAction() {
|
forwardButtonAction() {
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_PAYMENT_TYPE,
|
this.storeActions.SAVE_PAYMENT_TYPE,
|
||||||
|
|
@ -689,6 +697,7 @@ export default {
|
||||||
afterpayModalBanner,
|
afterpayModalBanner,
|
||||||
promoModalQuestion,
|
promoModalQuestion,
|
||||||
recalDisclaimer,
|
recalDisclaimer,
|
||||||
|
saveProgressModalQuestion,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue