update computed property for endorsements

This commit is contained in:
Katie Kroell 2023-09-14 14:16:37 -04:00
parent ddb394e0b5
commit 60abf0697e

View file

@ -119,8 +119,12 @@ export default {
: 0;
},
endorsementsForSelectedVehicle() {
// hardcoded until endorsements service is ready
return true;
const vehicle = this.policyVehicles.find((policyVehicle) =>
policyVehicle?.vin === this.selectedVehicleVin);
if (!vehicle) {
return undefined;
}
return vehicle.endorsements?.length > 0;
},
repairWaivedForSelectedVehicle() {
const vehicle = this.policyVehicles.find((policyVehicle) =>