navigation from policy-vehicles to endorsements

This commit is contained in:
Katie Kroell 2023-08-24 11:57:23 -04:00
parent b523e2c976
commit 606b43ef8e
3 changed files with 17 additions and 1 deletions

View file

@ -118,6 +118,10 @@ export default {
? vehicle?.coverages[0].deductible ? vehicle?.coverages[0].deductible
: 0; : 0;
}, },
endorsementsForSelectedVehicle() {
// hardcoded until endorsements service is ready
return true;
},
repairWaivedForSelectedVehicle() { repairWaivedForSelectedVehicle() {
const vehicle = this.policyVehicles.find((policyVehicle) => const vehicle = this.policyVehicles.find((policyVehicle) =>
policyVehicle.vin === this.selectedVehicleVin); policyVehicle.vin === this.selectedVehicleVin);
@ -148,6 +152,7 @@ export default {
// save selected vehicle to the store // save selected vehicle to the store
this.mainStore.updateVehicle(vehicle.data); this.mainStore.updateVehicle(vehicle.data);
this.displayGeneric = false; this.displayGeneric = false;
console.log(this.endorsementsForSelectedVehicle);
} }
} }
} }
@ -194,6 +199,11 @@ export default {
this.$route, this.$route,
{}, {},
{}); {});
} else if (!!this.endorsementsForSelectedVehicle) {
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS,
this.$route,
{},
{});
} else { } else {
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_LISTED_VEHICLE, this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_LISTED_VEHICLE,
this.$route, this.$route,

View file

@ -24,6 +24,7 @@ const navigationScenarios = {
// Policy Vehicle // Policy Vehicle
CLICKED_FORWARD_LISTED_VEHICLE: 'CLICKED_FORWARD_LISTED_VEHICLE', CLICKED_FORWARD_LISTED_VEHICLE: 'CLICKED_FORWARD_LISTED_VEHICLE',
CLICKED_FORWARD_NON_LISTED_VEHICLE: 'CLICKED_FORWARD_NON_LISTED_VEHICLE', CLICKED_FORWARD_NON_LISTED_VEHICLE: 'CLICKED_FORWARD_NON_LISTED_VEHICLE',
CLICKED_FORWARD_WITH_ENDORSEMENTS: 'CLICKED_FORWARD_WITH_ENDORSEMENTS',
// Vehicle Damage // Vehicle Damage
CLICKED_FORWARD_WITH_REPAIR: 'CLICKED_FORWARD_WITH_REPAIR', CLICKED_FORWARD_WITH_REPAIR: 'CLICKED_FORWARD_WITH_REPAIR',

View file

@ -392,7 +392,12 @@ const routingTable = () => [
{ {
scenario: navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, scenario: navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT,
destinationIssPageValue: issPageValues.BAILOUT_PAGE destinationIssPageValue: issPageValues.BAILOUT_PAGE
} },
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS,
destinationIssPageValue: issPageValues.ENDORSEMENTS_PAGE
},
] ]
}, },
{ {