save endorsement questions, update navigation
This commit is contained in:
parent
a797c6db98
commit
f78e32a94e
1 changed files with 8 additions and 6 deletions
|
|
@ -117,13 +117,14 @@ export default {
|
|||
? vehicle?.coverages[0].deductible
|
||||
: 0;
|
||||
},
|
||||
selectedVehicleHasEndorsements() {
|
||||
endorsementsForSelectedVehicle() {
|
||||
const vehicle = this.policyVehicles.find((policyVehicle) =>
|
||||
policyVehicle?.vin === this.selectedVehicleVin);
|
||||
if (!vehicle) {
|
||||
return false;
|
||||
if (vehicle?.endorsements?.length > 0) {
|
||||
|
||||
return vehicle.endorsements;
|
||||
}
|
||||
return vehicle.endorsements?.length > 0;
|
||||
return [];
|
||||
},
|
||||
repairWaivedForSelectedVehicle() {
|
||||
const vehicle = this.policyVehicles.find((policyVehicle) =>
|
||||
|
|
@ -182,7 +183,8 @@ export default {
|
|||
vin: this.selectedVehicleVin,
|
||||
noCoverage: this.noCoverageForSelectedVehicle,
|
||||
deductible: this.deductibleForSelectedVehicle,
|
||||
repairWaived: this.repairWaivedForSelectedVehicle
|
||||
repairWaived: this.repairWaivedForSelectedVehicle,
|
||||
endorsements: this.endorsementsForSelectedVehicle
|
||||
});
|
||||
|
||||
useMainStore().updateVehicle(this.vehicleFromLookup);
|
||||
|
|
@ -205,7 +207,7 @@ export default {
|
|||
{},
|
||||
{}
|
||||
);
|
||||
} else if (this.selectedVehicleHasEndorsements) {
|
||||
} else if (this.endorsementsForSelectedVehicle?.length > 0) {
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_ENDORSEMENTS,
|
||||
this.$route
|
||||
|
|
|
|||
Loading…
Reference in a new issue