From f846c271d1fb365b5593f2605c5f9db4f501ace8 Mon Sep 17 00:00:00 2001 From: CarlNation <32103961+CarlNation@users.noreply.github.com> Date: Tue, 9 Apr 2024 09:41:46 -0400 Subject: [PATCH] CSR-2068 CSR-2068 navigating manually triggers a session load. This reloads the referral from SV2 and the coverage status will be set to pending triggering the vehicle change during policy lookup even though they have not been to heritage yet. Changed the condition to include the policy number. --- src/layouts/estimate/estimate.vue | 7 ++++++- src/layouts/vehicle-damage/vehicle-damage.vue | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 4931b9c61..9c2ce4caf 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -258,8 +258,13 @@ export default { this.displayNonServiceableZipAlert = false; const payment = this.$store.getters.payment; + const policy = this.$store.getters.policy; + const vehicleChangedDuringPolicyLookupInHeritage = - payment.isInsurance && payment.insuranceCoverage.coverageStatus; + payment.isInsurance && + payment.insuranceCoverage.coverageStatus && + policy.policyNumber !== ""; + if (vehicleChangedDuringPolicyLookupInHeritage) { navigateToHeritageFunnel({ shouldSaveSession: true, diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 866567101..95ef0afda 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -367,11 +367,14 @@ export default { navigateForward() { const payment = this.$store.getters.payment; + const policy = this.$store.getters.policy; const vehicleChangedDuringPolicyLookupInHeritage = payment.isInsurance && payment.insuranceCoverage.coverageStatus && - payment.insuranceCoverage.coverageStatus !== ""; + payment.insuranceCoverage.coverageStatus !== "" && + policy.policyNumber !== ""; + if (vehicleChangedDuringPolicyLookupInHeritage) { if (store.getters.damage.isRepair) { this.$router.navigateWithSaving(