From 1131f3b17114c4a20c780aa4b201654c1626a0f5 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 10 Sep 2024 06:28:49 -0400 Subject: [PATCH] CSR-2193 submittedOrder submittedOrder from getters in vuex was also being referenced in cms confirmation page. changed the page reference to a custom variable pointing to the value coming from baseMixin --- src/layouts/confirmation/confirmation.vue | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index 19e4d2caf..347c7be31 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -109,13 +109,11 @@ import { getDisplayTextForDurationLength } from "@/helpers/duration-length-helpe export default { name: "confirmation", async beforeRouteEnter(to, from, next) { - console.log("beforeRoute.."); await baseMixin.methods.dispatchStoreAction(storeActions.CREATE_SUBMITTED_ORDER); // Call APIs - const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); - const submittedOrder = baseMixin.methods.getSubmittedOrder(); + const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); const wipersPromise = baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_WIPERS, @@ -188,6 +186,7 @@ export default { }, ConfirmationEmailText() { return this.getCmsContent("ConfirmationEmailWidget", "BodyText") + ?.replaceAll("{custom:submittedOrder.customer.emailAddress}", this.submittedOrder?.customer?.emailAddress) ?.replaceAll("{custom:MY_ACCOUNT_URL}", applicationConfig.MY_ACCOUNT) ?.replaceAll("{custom:CUSTOMER_PORTAL_LOGIN_TOKEN}", this.CustomerPortalLoginToken) ?.replaceAll("<", "<") @@ -206,13 +205,22 @@ export default { return this.submittedOrder?.schedule?.endTime; }, InShopWordingText() { - return this.getCmsContent("InShopWordingWidget", "BodyText"); + return this.getCmsContent("InShopWordingWidget", "BodyText") + ?.replaceAll("{custom:submittedOrder.vehicle.year}", this.submittedOrder?.vehicle?.year) + ?.replaceAll("{custom:submittedOrder.vehicle.make}", this.submittedOrder?.vehicle?.make) + ?.replaceAll("{custom:submittedOrder.vehicle.model}", this.submittedOrder?.vehicle?.model); }, MobileWordingText() { - return this.getCmsContent("MobileWordingWidget", "BodyText"); + return this.getCmsContent("MobileWordingWidget", "BodyText") + ?.replaceAll("{custom:submittedOrder.vehicle.year}", this.submittedOrder?.vehicle?.year) + ?.replaceAll("{custom:submittedOrder.vehicle.make}", this.submittedOrder?.vehicle?.make) + ?.replaceAll("{custom:submittedOrder.vehicle.model}", this.submittedOrder?.vehicle?.model); }, DropOffWordingText() { - return this.getCmsContent("DropOffWordingWidget", "BodyText"); + return this.getCmsContent("DropOffWordingWidget", "BodyText") + ?.replaceAll("{custom:submittedOrder.vehicle.year}", this.submittedOrder?.vehicle?.year) + ?.replaceAll("{custom:submittedOrder.vehicle.make}", this.submittedOrder?.vehicle?.make) + ?.replaceAll("{custom:submittedOrder.vehicle.model}", this.submittedOrder?.vehicle?.model); }, ServiceLocationAddress() { return this.submittedOrder?.serviceLocation?.address;