diff --git a/src/layouts/insurance-company/insurance-company.vue b/src/layouts/insurance-company/insurance-company.vue index ddfffe177..452484e48 100644 --- a/src/layouts/insurance-company/insurance-company.vue +++ b/src/layouts/insurance-company/insurance-company.vue @@ -101,7 +101,7 @@ export default { return !!this.parentAccountNumber; }, payWithCashButtonCopy() { - return "Pay on my own"; + return this.getCmsContent("PayWithCashWidget", "Text"); } }, methods: { @@ -122,8 +122,11 @@ export default { }, backButtonAction(forceCashSelectionOnQuote) { // Go back to Quote page - if (forceCashSelectionOnQuote) - this.$route.params['forceCashSelection'] = true; + if (forceCashSelectionOnQuote) { + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route, {"isCashSelected": true}); + return; + } + this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); }, async forwardButtonAction() { diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 42e3aecd0..deca0d6d1 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -293,7 +293,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -345,7 +345,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); //Assert @@ -388,7 +388,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -432,7 +432,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote", isInsurance: false } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -478,7 +478,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -523,7 +523,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -570,7 +570,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -618,7 +618,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); @@ -662,7 +662,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, (c) => c(wrapper.vm) ); //Assert @@ -783,7 +783,7 @@ describe("quote.vue", () => { await quote.beforeRouteEnter.call( wrapper.vm, { query: { fmgPage: "quote" } }, - {params:{}}, + undefined, nextFunction ); await nextTick(); diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 99b75c9a7..20dc16304 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -328,8 +328,8 @@ export default { } const getIsInsuranceSelectedValue = (availableLineItems, insuranceThreshold) => { - // routeParam checked here is set on insurance-selection "Pay on my own" link click - if (from.params.forceCashSelection) { + // query param checked here is set on insurance-selection "Pay on my own" link click + if (to.query?.isCashSelected || to.query?.iscashselected) { return false; } const serviceLocationState = store.getters.order.serviceLocation.state;