From f4eb96ecb354fd29f55c319256c0d0fae2e367b8 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Mon, 8 Sep 2025 10:37:45 -0400 Subject: [PATCH] add big truck alert to policy-vehicles page --- .../policy-vehicles/policy-vehicles.vue | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/layouts/policy-vehicles/policy-vehicles.vue b/src/layouts/policy-vehicles/policy-vehicles.vue index 65cc7ea6..10ef05d9 100644 --- a/src/layouts/policy-vehicles/policy-vehicles.vue +++ b/src/layouts/policy-vehicles/policy-vehicles.vue @@ -24,10 +24,17 @@ cmsWidgetName="PolicyVehiclesQuestion" :vehicles="VehiclesForQuestions" :validationRules="rules.optionRequired" /> + @@ -58,6 +65,7 @@ import { repairWaivedForSelectedVehicle } from '@/helpers/policy-vehicle-helper'; import coverageType from '@/constants/coverage-type'; +import alert from '@/ux-components/alert/alert.vue'; export default { name: 'policy-vehicles', @@ -67,7 +75,8 @@ export default { vehicleBanner, policyVehiclesQuestion, // eslint-disable-next-line vue/no-reserved-component-names - Form + Form, + alert }, mixins: [BaseFormMixin], async beforeRouteEnter(to, from, next) { @@ -89,7 +98,8 @@ export default { policyVinFound: true, rules: { optionRequired: globalRules.OPTION_REQUIRED - } + }, + displayNoServiceAlert: false }; }, computed: { @@ -115,7 +125,6 @@ export default { if (this.selectedVehicleVin !== vehicleSelectionOptions.VEHICLE_NOT_LISTED) { return this.policyVehicles.find((p) => p.vin === this.selectedVehicleVin); } - return null; }, noCoverageForSelectedVehicle() { @@ -137,6 +146,7 @@ export default { }, watch: { async selectedVehicleVin(value) { + this.resetAlert(); if (value === vehicleSelectionOptions.VEHICLE_NOT_LISTED) { // clear previously selected vehicle and image this.mainStore.resetVehicleState(); @@ -151,6 +161,9 @@ export default { this.displayGeneric = true; return; } + if (vehicle.data.isBigTruck && !vehicle.data.canSafeliteService) { + this.displayNoServiceAlert = true; + } if (vehicle) { // save selected vehicle to the store this.displayGeneric = false; @@ -273,6 +286,9 @@ export default { data: responseError.data }; } + }, + resetAlert() { + this.displayNoServiceAlert = false; } } };