From 60abf0697e9cfb4a70b54a8862220d9807e171e8 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Thu, 14 Sep 2023 14:16:37 -0400 Subject: [PATCH] update computed property for endorsements --- src/layouts/policy-vehicles/policy-vehicles.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layouts/policy-vehicles/policy-vehicles.vue b/src/layouts/policy-vehicles/policy-vehicles.vue index 5287be82..869aa864 100644 --- a/src/layouts/policy-vehicles/policy-vehicles.vue +++ b/src/layouts/policy-vehicles/policy-vehicles.vue @@ -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) =>