From 606b43ef8e316baa855cff0eb94e8221a317d60d Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Thu, 24 Aug 2023 11:57:23 -0400 Subject: [PATCH] navigation from policy-vehicles to endorsements --- src/layouts/policy-vehicles/policy-vehicles.vue | 10 ++++++++++ src/router/router-constants/navigation-scenarios.js | 1 + src/router/router-constants/routing-table.js | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/layouts/policy-vehicles/policy-vehicles.vue b/src/layouts/policy-vehicles/policy-vehicles.vue index e10df300..dcd70af7 100644 --- a/src/layouts/policy-vehicles/policy-vehicles.vue +++ b/src/layouts/policy-vehicles/policy-vehicles.vue @@ -118,6 +118,10 @@ export default { ? vehicle?.coverages[0].deductible : 0; }, + endorsementsForSelectedVehicle() { + // hardcoded until endorsements service is ready + return true; + }, repairWaivedForSelectedVehicle() { const vehicle = this.policyVehicles.find((policyVehicle) => policyVehicle.vin === this.selectedVehicleVin); @@ -148,6 +152,7 @@ export default { // save selected vehicle to the store this.mainStore.updateVehicle(vehicle.data); this.displayGeneric = false; + console.log(this.endorsementsForSelectedVehicle); } } } @@ -194,6 +199,11 @@ export default { this.$route, {}, {}); + } else if (!!this.endorsementsForSelectedVehicle) { + this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS, + this.$route, + {}, + {}); } else { this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_LISTED_VEHICLE, this.$route, diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index 934065c1..2d2d4be3 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -24,6 +24,7 @@ const navigationScenarios = { // Policy Vehicle CLICKED_FORWARD_LISTED_VEHICLE: 'CLICKED_FORWARD_LISTED_VEHICLE', CLICKED_FORWARD_NON_LISTED_VEHICLE: 'CLICKED_FORWARD_NON_LISTED_VEHICLE', + CLICKED_FORWARD_WITH_ENDORSEMENTS: 'CLICKED_FORWARD_WITH_ENDORSEMENTS', // Vehicle Damage CLICKED_FORWARD_WITH_REPAIR: 'CLICKED_FORWARD_WITH_REPAIR', diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index b61db6d8..a0622319 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -392,7 +392,12 @@ const routingTable = () => [ { scenario: navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, destinationIssPageValue: issPageValues.BAILOUT_PAGE - } + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS, + destinationIssPageValue: issPageValues.ENDORSEMENTS_PAGE + }, + ] }, {