diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 12270bda2..7f93383fc 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -328,8 +328,15 @@ export default { }, navigateForward() { + const payment = store.getters.payment; + if (payment.isInsurance && payment.insuranceCoverage.coverageStatus === "VERIFIED") { + this.$router.navigateWithSaving( + this.navigationScenarios.CLICKED_FORWARD_WITH_VERIFIED_INSURANCE, + this.$route + ); + } // If vin already exists, navigate directly to vin-lookup - if (store.getters.vehicle.vin) { + else if (store.getters.vehicle.vin) { this.$router.navigateWithSaving( this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index 75ec9b11b..211f34838 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -458,8 +458,10 @@ export default { self.$store.commit(storeMutations.UPDATE_GLASS_PARTS, collectedGlassParts); const payment = self.$store.getters.payment; - // TODO KO If coverageStatus is null, they haven't gone to heritage yet... I think - shouldGoToHeritageQuote || (payment.isInsurance && payment.insuranceCoverage.coverageStatus) + // TODO KO If coverageStatus is null, they haven't been to heritage yet... + // TODO KO what happens if you go to CCPolicyInfo (insurance), go back to vin-lookup, and go forward. + // Does it skip quote? + shouldGoToHeritageQuote || (payment.isInsurance && payment.insuranceCoverage.isVerified) ? navigateToHeritageFunnel({loadingModal: self.$refs.loadingModal}) : self.$router.navigateWithSaving( self.navigationScenarios.HAS_NO_MORE_QUESTIONS, diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index bf7a6a052..ec5b9160f 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -12,6 +12,7 @@ const navigationScenarios = { // Vin pages CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN", CLICKED_FORWARD_WITH_VIN: "CLICKED_FORWARD_WITH_VIN", + CLICKED_FORWARD_WITH_VERIFIED_INSURANCE: "CLICKED_FORWARD_WITH_VERIFIED_INSURANCE", CLICKED_FORWARD_WITHOUT_VIN: "CLICKED_FORWARD_WITHOUT_VIN", CONTINUING_WITH_MULTIPLE_VEHICLES: "CONTINUING_WITH_MULTIPLE_VEHICLES", SELECTED_VIN_HAS_MISMATCHED_GLASS: "SELECTED_VIN_HAS_MISMATCHED_GLASS", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 5c76ef5e1..47c5433b3 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -67,6 +67,10 @@ const routingTable = function (store) { scenario: navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN, destinationFmgPageValue: fmgPageValues.ESTIMATE, }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_VERIFIED_INSURANCE, + destinationFmgPageValue: fmgPageValues.ESTIMATE, + }, ], }, {