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;