@@ -111,10 +106,6 @@ export default {
: "";
return accountNumber;
},
- handleBeforeUnload() {
- const insuranceCompanyPage = document.getElementById("insurance-company");
- insuranceCompanyPage.parentElement.removeChild(insuranceCompanyPage);
- },
arePagePrerequisitesValid() {
return store.getters.order.payment.isInsurance === true;
},
@@ -144,17 +135,20 @@ export default {
billToAccountNumber,
false
);
- //Manually unmount component in case navigate to external application.
- window.addEventListener("beforeunload", this.handleBeforeUnload);
+ //Reload page when navigate with browser back button
+ window.addEventListener("pageshow", this.handlePageShow);
navigateToHeritageFunnel({
shouldSaveSession: true,
pageNameToLog: "insurance-company",
});
},
+ handlePageShow() {
+ window.location.reload();
+ },
},
unmounted() {
- window.removeEventListener("beforeunload", this.handleBeforeUnload);
+ window.removeEventListener("pageshow", this.handlePageShow);
},
components: {
funnelHeader,
diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue
index 0f3d45d1a..93bdb6f27 100644
--- a/src/layouts/service-location/service-location.vue
+++ b/src/layouts/service-location/service-location.vue
@@ -515,7 +515,11 @@ export default {
},
backButtonAction() {
const payment = store.getters.order.payment;
- if (payment?.isInsurance && payment?.insuranceCoverage?.isVerified) {
+ if (
+ payment?.isInsurance &&
+ (payment?.insuranceCoverage?.isVerified ||
+ store.getters.order.referralNumber.length === 6)
+ ) {
navigateToHeritageFunnel({ shouldSaveSession: false });
} else {
this.$router.navigateWithoutSaving(
diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue
index 5f47a3638..931a8f23f 100644
--- a/src/layouts/vehicle/vehicle.vue
+++ b/src/layouts/vehicle/vehicle.vue
@@ -398,7 +398,12 @@ export default {
},
methods: {
isDisabled(options) {
- if (!options.length || store.getters.payment?.insuranceCoverage?.isVerified) {
+ if (
+ !options.length ||
+ store.getters.payment?.insuranceCoverage?.isVerified ||
+ (store.getters.order.payment?.isInsurance &&
+ getFunnelCookie().HasDelayedClaimRegistration)
+ ) {
return true;
} else {
return false;
diff --git a/src/store/index.js b/src/store/index.js
index ca10f8f62..9ee0e6e19 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -826,10 +826,6 @@ export const getters = {
order = state.order;
}
- if (order.payment.isInsurance) {
- return false;
- }
-
return (
experimentMixin.methods
.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)