From a0acb7ffd470e0087d0d0f330c30c850e72e1889 Mon Sep 17 00:00:00 2001 From: CarlNation <32103961+CarlNation@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:19:21 -0500 Subject: [PATCH 1/2] CSR-1072 back button for end to end CSR-1072 back button for end to end should go back to heritage --- src/layouts/service-location/service-location.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 4e890e531..bf9b9495c 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -138,6 +138,7 @@ import { getServiceabilityDetails, getShopProviderData, } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; +import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import { Provider } from "@/layouts/service-location/classes/provider"; @@ -438,7 +439,14 @@ export default { this.recalibrationInformationModal.openModal(); }, backButtonAction() { - this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); + if (store.getters.order.payment.isInsurance) { + navigateToHeritageFunnel({shouldSaveSession: false}); + } else { + this.$router.navigateWithoutSaving( + this.navigationScenarios.CLICKED_BACK, + this.$route + ); + } }, updateAndSaveSupportingItems() { const supportingItems = store.getters.lineItems.supportingItems; From 0d02b5cd7aca02f78ddee1122d06be79ed03ed9f Mon Sep 17 00:00:00 2001 From: CarlNation <32103961+CarlNation@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:33:32 -0500 Subject: [PATCH 2/2] prettier --- src/layouts/service-location/service-location.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index bf9b9495c..a12e9ff78 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -440,7 +440,7 @@ export default { }, backButtonAction() { if (store.getters.order.payment.isInsurance) { - navigateToHeritageFunnel({shouldSaveSession: false}); + navigateToHeritageFunnel({ shouldSaveSession: false }); } else { this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_BACK,