From 831d4f8ecd859957b31f10180fbc22410fc54d1b Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 4 Mar 2025 09:38:04 -0500 Subject: [PATCH 01/12] CASH-276 CASH-276 initial changes to add heavy truck --- src/constants/store-mutations.js | 1 + src/constants/vehicle-categories.js | 6 +++ src/layouts/vehicle/vehicle.vue | 73 +++++++++++++++++++++++++++-- src/store/index.js | 19 +++++++- 4 files changed, 93 insertions(+), 6 deletions(-) diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index dceeac63e..a88f5dddb 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -9,6 +9,7 @@ const storeMutations = { UPDATE_MAKE: "updateMake", UPDATE_MODEL: "updateModel", UPDATE_STYLE: "updateStyle", + UPDATE_VEHICLE_SUBTYPE: "updateVehicleSubType", UPDATE_CAR_ID: "updateCarId", UPDATE_VEHICLE_CATEGORY: "updateVehicleCategory", UPDATE_VEHICLE_IMAGE_URL: "updateVehicleImageUrl", diff --git a/src/constants/vehicle-categories.js b/src/constants/vehicle-categories.js index 37ffcf5e1..9300f47e2 100644 --- a/src/constants/vehicle-categories.js +++ b/src/constants/vehicle-categories.js @@ -9,3 +9,9 @@ const vehicleCategories = { }; export { vehicleCategories }; + +const vehicleSubTypes = { + HEAVY_TRUCK: "HEAVY TRUCK", +}; + +export { vehicleSubTypes }; diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index 12e7268fa..4edccc675 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -48,6 +48,19 @@ validationRules="style-required" placeHolderText="Select style" customDropdownId="styleQuestionField" /> + +
+
+ +
+ @@ -557,4 +615,9 @@ export default { margin-top: 1.5rem; margin-bottom: 0; } +.separator-line { + grid-area: 2/1/2/8; + border-top: 1px solid $gray-500; + margin: 0.5rem 0; +} diff --git a/src/store/index.js b/src/store/index.js index 3408c0b26..2f3772255 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -61,6 +61,7 @@ const getDefaultState = () => { make: null, model: null, style: null, + vehicleSubType: null, carId: null, category: null, vin: null, @@ -210,6 +211,9 @@ export const mutations = { updateStyle(state, style) { state.order.vehicle.style = style; }, + updateVehicleSubType(state, vehicleSubType) { + state.order.vehicle.vehicleSubType = vehicleSubType; + }, updateCarId(state, carId) { state.order.vehicle.carId = carId; }, @@ -2121,6 +2125,7 @@ export const actions = { model: vehicle.model, style: vehicle.style, vin: vehicle.vin, + vehicleSubType: vehicle.vehicleSubType, registration: { firstName: vehicle.registration.firstName, lastName: vehicle.registration.lastName, @@ -2330,7 +2335,18 @@ export const actions = { // Vehicle saveVehicle( context, - { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor } + { + year, + make, + model, + style, + vehicleSubType, + carId, + category, + imageUrl, + imageVifNumber, + imageVifColor, + } ) { if ( context.state.order.vehicle.year != year || @@ -2346,6 +2362,7 @@ export const actions = { context.commit(storeMutations.UPDATE_MAKE, make); context.commit(storeMutations.UPDATE_MODEL, model); context.commit(storeMutations.UPDATE_STYLE, style); + context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType); context.commit(storeMutations.UPDATE_CAR_ID, carId); context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl); From eb33bd46ffb0905e186268f0a3ab30a50b593163 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 4 Mar 2025 10:23:22 -0500 Subject: [PATCH 02/12] prettier --- src/layouts/vehicle/vehicle.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index 4edccc675..fafa4c079 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -426,7 +426,9 @@ export default { ); }, showHeavyTruck() { - return this.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK && !this.displayNoServiceAlert; + return ( + this.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK && !this.displayNoServiceAlert + ); }, }, methods: { From e1c5fc83c446ee1aacbb27688807c23d3a6d6351 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 17 Mar 2025 13:34:40 -0400 Subject: [PATCH 03/12] CASH-276 CASH-276 add call to location service to determine if a zip code has a provider that can service heavy truck --- src/constants/endpoints.js | 4 ++++ src/constants/store-actions.js | 1 + src/layouts/vehicle/vehicle.vue | 26 ++++++++++++++++++-------- src/store/index.js | 9 +++++++++ 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 29d36d091..976696976 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -188,6 +188,10 @@ const endpoints = { url: "/account/api/v1/account/bill-to-account-number", method: "GET", }, + ClosestApplicableShops: { + url: "/location/api/v1/location/closest-applicable-shops", + method: "GET", + }, }; export { endpoints }; diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 6c6ba62b7..4a5e713f4 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -53,6 +53,7 @@ const storeActions = { GET_INSURANCE_COMPANY_LIST: "getInsuranceCompanyList", GET_BILL_TO_ACCOUNT_NUMBER: "getBillToAccountNumber", GET_RECAL_PARTS_AND_SAVE_TO_LINE_ITEMS: "getRecalPartsAndSaveToLineItems", + GET_CLOSEST_APPLICABLE_SHOPS: "getClosestApplicableShops", // Analytics LOG_EXPERIMENT_EXPOSURE_AND_UPDATE_STORE: "logExperimentExposureAndUpdateStore", diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index fafa4c079..521793adc 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -49,7 +49,7 @@ placeHolderText="Select style" customDropdownId="styleQuestionField" /> -
+
Date: Mon, 17 Mar 2025 13:43:49 -0400 Subject: [PATCH 04/12] prettier prettier --- src/layouts/vehicle/vehicle.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index 521793adc..bab3a92e8 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -427,9 +427,7 @@ export default { ); }, isHeavyTruck() { - return ( - this.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK && this.canSafeliteService - ); + return this.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK && this.canSafeliteService; }, }, methods: { From b9f14fdb2d270836c241dc0f8f41c4def2caf5c9 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 18 Mar 2025 03:55:00 -0400 Subject: [PATCH 05/12] CASH-276 CASH-276 persist canSafeliteService field --- src/constants/store-mutations.js | 1 + src/layouts/vehicle/vehicle.vue | 10 +++++++++- src/store/index.js | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 6a5873e83..509988c6e 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -17,6 +17,7 @@ const storeMutations = { UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor", UPDATE_VEHICLE_VIN: "updateVehicleVin", UPDATE_VEHICLE: "updateVehicle", + UPDATE_VEHICLE_CAN_SAFELITE_SERVICE: "updateVehicleCanSafeliteService", UPDATE_IS_REPAIR: "updateIsRepair", UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips", diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index bab3a92e8..da4ee6689 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -140,7 +140,7 @@ export default { modelOptions: [], styleOptions: [], displayNoServiceAlert: false, - canSafeliteService: false, + canSafeliteService: this.canSafeliteServiceFromStore(), }; }, @@ -316,6 +316,9 @@ export default { }, watch: { + serviceZipCode(newValue, oldValue) { + this.resetAlert(); + }, async selectedYear(year) { this.resetAlert(); this.makeOptions = []; @@ -323,6 +326,7 @@ export default { this.selectedModel = null; this.selectedStyle = null; this.vehicleSubType = null; + this.canSafeliteService = false; this.carId = null; if (year) { const result = await this.getMakeOptions(year); @@ -496,6 +500,7 @@ export default { vehicleSubType: this.vehicleSubType, carId: this.carId, category: this.category, + canSafeliteService: this.canSafeliteService, imageUrl: this.imageUrl, imageVifNumber: this.imageVifNumber, imageVifColor: this.imageVifColor, @@ -553,6 +558,9 @@ export default { selectedStylefromStore() { return store.getters.externalParameterVehicle.style ?? store.getters.vehicle.style; }, + canSafeliteServiceFromStore() { + return store.getters.vehicle.canSafeliteService ?? false; + }, async getMakeOptions(year) { return await baseMixin.methods.dispatchStoreActionWithLogging( storeActions.GET_VEHICLE_MAKES, diff --git a/src/store/index.js b/src/store/index.js index aaee4c996..08307ec12 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -65,6 +65,7 @@ const getDefaultState = () => { carId: null, category: null, vin: null, + canSafeliteService: null, imageUrl: null, imageVifNumber: null, imageColor: null, @@ -221,6 +222,9 @@ export const mutations = { updateVehicleCategory(state, category) { state.order.vehicle.category = category; }, + updateVehicleCanSafeliteService(state, canSafeliteService) { + state.order.vehicle.canSafeliteService = canSafeliteService; + }, updateVehicleImageUrl(state, imageUrl) { state.order.vehicle.imageUrl = imageUrl; }, @@ -2357,6 +2361,7 @@ export const actions = { vehicleSubType, carId, category, + canSafeliteService, imageUrl, imageVifNumber, imageVifColor, @@ -2379,6 +2384,7 @@ export const actions = { context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType); context.commit(storeMutations.UPDATE_CAR_ID, carId); context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); + context.commit(storeMutations.UPDATE_VEHICLE_CAN_SAFELITE_SERVICE, canSafeliteService); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor); From 0becaee2030c8c3ed92a787c367c0c26a9ed5246 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Wed, 19 Mar 2025 17:08:58 +0530 Subject: [PATCH 06/12] CASH-278 pass additional param isHeavyTruckVehicle to provider endpoint to filter heavy truck shops --- src/store/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index 08307ec12..02677051b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -51,6 +51,7 @@ import { import { externalParameterStatus } from "@/constants/external-parameters"; import { experimentSettings } from "@/constants/experiments"; import experimentMixin from "@/mixins/experiment-mixin.js"; +import { vehicleSubTypes } from "@/constants/vehicle-categories.js"; // Export State const getDefaultState = () => { @@ -845,6 +846,9 @@ export const getters = { return false; }, + isHeavyTruckVehicle: (state) => { + return state.order.vehicle.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK; + }, isMobileAppointment: (state) => { return state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE; }, @@ -1858,6 +1862,8 @@ export const actions = { if (windshieldPartWithRecal) { url += `/${windshieldPartWithRecal.partNumber}`; } + //heavy truck vehicle + url += `/${context.getters.isHeavyTruckVehicle}`; return globalMethods.callHttpClient({ method: endpoints.GetProviders.method, From acb64c788fc87cecae15675cf38482754abd5e2c Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 19 Mar 2025 14:01:21 -0400 Subject: [PATCH 07/12] CASH-320 CASH-320 pass isHeavyTruck flag to serviceability endpoint to determine mobile availability --- src/store/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index 02677051b..19fb5316a 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1836,6 +1836,8 @@ export const actions = { endPoint += `&${glassPieces}`; } + endPoint += `&isHeavyTruckVehicle=${context.getters.isHeavyTruckVehicle}`; + return globalMethods.callHttpClient({ method: endpoints.GetServiceabilityDetails.method, endpoint: endPoint, From e9c0898442bd5124db4cf9a91451b09726b14346 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 27 Mar 2025 14:18:51 -0400 Subject: [PATCH 08/12] CASH-417 CASH-417 pass vehicle sub type to save-progress endpoint --- src/store/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/index.js b/src/store/index.js index 26186e208..abed5d31c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2110,6 +2110,7 @@ export const actions = { year: vehicle.year, make: vehicle.make, model: vehicle.model, + subType: vehicle.vehicleSubType, isInsurance: order.payment.isInsurance ?? false, isVerified: order.payment.insuranceCoverage.isVerified ?? false, lineItems: { From 9d2b530b12d3d8d0198d67e845c70298b2dca799 Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Fri, 28 Mar 2025 11:33:18 -0400 Subject: [PATCH 09/12] CASH-277: Check applicable stores for heavy truck on location change. --- .../service-location-helper.js | 17 ++++++++++ .../service-location/service-location.vue | 10 ++++++ .../service-zip-modal-question.vue | 31 +++++++++++++++++++ 3 files changed, 58 insertions(+) diff --git a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js index 7a9ac00d0..106ed892c 100644 --- a/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js +++ b/src/layouts/service-location/helpers/service-location-helper/service-location-helper.js @@ -149,6 +149,23 @@ export async function getAvailabilityRating( return shopStatus; } +export async function getClosestApplicableShops(serviceZipCode, carId, pageNameToLog) { + if (!serviceZipCode) { + return null; + } + + const closestShops = await baseMixin.methods.dispatchStoreActionWithLogging( + storeActions.GET_CLOSEST_APPLICABLE_SHOPS, + { + zip: serviceZipCode, + carId: carId, + }, + pageNameToLog + ); + + return closestShops.data; +} + export async function getZipCodeData(serviceZipCode) { return await baseMixin.methods.getZipCodeData(serviceZipCode, "service-location"); } diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 56c76bb2d..142c3468b 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -15,6 +15,8 @@ editScreenReaderTextCmsWidgetName="ScreenReaderZipEditWidget" v-model="serviceZipCodeQuestion" ref="serviceZipCodeQuestion" + :carId="carId" + :isVehicleHeavyTruck="isVehicleHeavyTruck" :mobileFeePart="mobileFeePart" @updated-mobile-fee-part="setMobileFeePart" @updated-recycle-fee-part="setRecycleFeePart" @@ -186,9 +188,11 @@ export default { return { streetAddress: this.getServiceAddressFromStore(), apartmentNumberOrBusinessName: this.getServiceAddress2FromStore(), + carId: this.getCarIdfromStore(), city: this.getServiceCityFromStore(), state: this.getServiceStateFromStore(), zipCode: this.getServiceZipCodeFromStore(), + isVehicleHeavyTruck: this.getIsVehicleHeavyTruckFromStore(), isVehicleProtected: this.getIsVehicleProtectedFromStore(), isGlassServiceableInshop: null, isRecalibrationServiceableInshop: null, @@ -514,6 +518,9 @@ export default { }); } }, + getCarIdfromStore() { + return store.getters.vehicle.carId; + }, getServiceAddressFromStore() { return store.getters.order.serviceLocation.address; }, @@ -529,6 +536,9 @@ export default { getServiceZipCodeFromStore() { return store.getters.order.serviceLocation.zipCode; }, + getIsVehicleHeavyTruckFromStore() { + return store.getters.isHeavyTruckVehicle; + }, getIsVehicleProtectedFromStore() { return store.getters.order.serviceLocation.isVehicleProtected; }, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index a2ab4134e..5e7aa73e4 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -33,6 +33,13 @@ cmsWidgetName="AlertInvalidZipWidget" alertClass="alert-danger" v-bind:isDismissible="false" /> + @@ -48,6 +55,7 @@ import { getPricedRecycleFeePart, getServiceabilityDetails, getBillToAccountNumber, + getClosestApplicableShops, } from "@/layouts/service-location/helpers/service-location-helper/service-location-helper"; export default { @@ -63,6 +71,7 @@ export default { internalModel: this.copyModel(this.modelValue), serviceZipCodeTextInputId: "", displayInvalidZipAlert: false, + displayNoServiceAlert: false, }; }, props: { @@ -73,6 +82,11 @@ export default { zipCode: "", }), }, + carId: String, + isVehicleHeavyTruck: { + type: Boolean, + default: false, + }, mobileFeePart: { type: Object, default: () => ({}), @@ -107,6 +121,7 @@ export default { methods: { resetAlerts() { this.displayInvalidZipAlert = false; + this.displayNoServiceAlert = false; }, resetsOnZipInput() { this.resetAlerts(); @@ -155,6 +170,22 @@ export default { this.focusOnZipInput(); this.resetModalButtonStyle(); } else { + if (this.isVehicleHeavyTruck) { + // check the location endpoint to verify this zip can service a heavy truck + const closestShops = await getClosestApplicableShops( + this.internalModel.zipCode, + this.carId, + "service-location" + ); + + if (!closestShops || closestShops.providers?.length === 0) { + this.displayNoServiceAlert = true; + this.focusOnZipInput(); + this.resetModalButtonStyle(); + return null; + } + } + this.internalModel.state = zipCodeData.state; this.internalModel.zipCodeCtu = zipCodeData.zipCodeCtu; From 76b26e2991597aefaa61dd03664fff3ff8f009a5 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 3 Apr 2025 10:57:06 -0400 Subject: [PATCH 10/12] CASH-417 CASH-417 use the isBigTruck property returned from the service instead of computing it based on subType and special class --- src/constants/store-mutations.js | 2 ++ src/constants/vehicle-categories.js | 8 +----- .../service-location/service-location.vue | 2 +- .../shop-question/shop-question.vue | 7 +++++- src/layouts/vehicle/vehicle.vue | 25 +++++++++++-------- src/store/index.js | 24 +++++++++++++----- 6 files changed, 42 insertions(+), 26 deletions(-) diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 509988c6e..2f53d8133 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -10,6 +10,8 @@ const storeMutations = { UPDATE_MODEL: "updateModel", UPDATE_STYLE: "updateStyle", UPDATE_VEHICLE_SUBTYPE: "updateVehicleSubType", + UPDATE_VEHICLE_SPECIAL_CLASS: "updateVehicleSpecialClass", + UPDATE_IS_BIGTRUCK: "updateIsBigTruck", UPDATE_CAR_ID: "updateCarId", UPDATE_VEHICLE_CATEGORY: "updateVehicleCategory", UPDATE_VEHICLE_IMAGE_URL: "updateVehicleImageUrl", diff --git a/src/constants/vehicle-categories.js b/src/constants/vehicle-categories.js index 9300f47e2..8ef3e0134 100644 --- a/src/constants/vehicle-categories.js +++ b/src/constants/vehicle-categories.js @@ -8,10 +8,4 @@ const vehicleCategories = { SEMI: "SEMI", }; -export { vehicleCategories }; - -const vehicleSubTypes = { - HEAVY_TRUCK: "HEAVY TRUCK", -}; - -export { vehicleSubTypes }; +export { vehicleCategories }; \ No newline at end of file diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 142c3468b..758dc88e9 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -537,7 +537,7 @@ export default { return store.getters.order.serviceLocation.zipCode; }, getIsVehicleHeavyTruckFromStore() { - return store.getters.isHeavyTruckVehicle; + return store.getters.order.vehicle.isBigTruck; }, getIsVehicleProtectedFromStore() { return store.getters.order.serviceLocation.isVehicleProtected; diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index a15d8bb0b..c0e2bffe0 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -179,10 +179,15 @@ export default { } }); + var joinedShops = shops.join(","); + if (!joinedShops) { + joinedShops = "no-shops"; + } + this.pushEventToGA( this.GaCategories.SERVICE_LOCATION, gaAction, - shops.join(","), + joinedShops, true ); } diff --git a/src/layouts/vehicle/vehicle.vue b/src/layouts/vehicle/vehicle.vue index da4ee6689..257de9bf6 100644 --- a/src/layouts/vehicle/vehicle.vue +++ b/src/layouts/vehicle/vehicle.vue @@ -49,7 +49,7 @@ placeHolderText="Select style" customDropdownId="styleQuestionField" /> -
+
{ @@ -63,6 +62,8 @@ const getDefaultState = () => { model: null, style: null, vehicleSubType: null, + vehicleSpecialClass: null, + isBigTruck: false, carId: null, category: null, vin: null, @@ -217,6 +218,12 @@ export const mutations = { updateVehicleSubType(state, vehicleSubType) { state.order.vehicle.vehicleSubType = vehicleSubType; }, + updateVehicleSpecialClass(state, vehicleSpecialClass) { + state.order.vehicle.vehicleSpecialClass = vehicleSpecialClass; + }, + updateIsBigTruck(state, isBigTruck) { + state.order.vehicle.isBigTruck = isBigTruck; + }, updateCarId(state, carId) { state.order.vehicle.carId = carId; }, @@ -847,9 +854,6 @@ export const getters = { return false; }, - isHeavyTruckVehicle: (state) => { - return state.order.vehicle.vehicleSubType === vehicleSubTypes.HEAVY_TRUCK; - }, isMobileAppointment: (state) => { return state.order.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE; }, @@ -1849,7 +1853,7 @@ export const actions = { endPoint += `&${glassPieces}`; } - endPoint += `&isHeavyTruckVehicle=${context.getters.isHeavyTruckVehicle}`; + endPoint += `&isHeavyTruckVehicle=${context.getters.order.vehicle.isBigTruck}`; return globalMethods.callHttpClient({ method: endpoints.GetServiceabilityDetails.method, @@ -1878,7 +1882,7 @@ export const actions = { url += `/${windshieldPartWithRecal.partNumber}`; } //heavy truck vehicle - url += `/${context.getters.isHeavyTruckVehicle}`; + url += `/${context.getters.order.vehicle.isBigTruck}`; return globalMethods.callHttpClient({ method: endpoints.GetProviders.method, @@ -2111,6 +2115,8 @@ export const actions = { make: vehicle.make, model: vehicle.model, subType: vehicle.vehicleSubType, + specialClass: vehicle.vehicleSpecialClass, + isBigTruck: vehicle.isBigTruck, isInsurance: order.payment.isInsurance ?? false, isVerified: order.payment.insuranceCoverage.isVerified ?? false, lineItems: { @@ -2165,6 +2171,8 @@ export const actions = { style: vehicle.style, vin: vehicle.vin, vehicleSubType: vehicle.vehicleSubType, + vehicleSpecialClass: vehicle.vehicleSpecialClass, + isBigTruck: vehicle.isBigTruck, registration: { firstName: vehicle.registration.firstName, lastName: vehicle.registration.lastName, @@ -2381,6 +2389,8 @@ export const actions = { model, style, vehicleSubType, + vehicleSpecialClass, + isBigTruck, carId, category, canSafeliteService, @@ -2404,6 +2414,8 @@ export const actions = { context.commit(storeMutations.UPDATE_MODEL, model); context.commit(storeMutations.UPDATE_STYLE, style); context.commit(storeMutations.UPDATE_VEHICLE_SUBTYPE, vehicleSubType); + context.commit(storeMutations.UPDATE_VEHICLE_SPECIAL_CLASS, vehicleSpecialClass); + context.commit(storeMutations.UPDATE_IS_BIGTRUCK, isBigTruck); context.commit(storeMutations.UPDATE_CAR_ID, carId); context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); context.commit(storeMutations.UPDATE_VEHICLE_CAN_SAFELITE_SERVICE, canSafeliteService); From 749fa3219e5d8eef2e068805a3b1832c569867cd Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 3 Apr 2025 12:07:11 -0400 Subject: [PATCH 11/12] prettier --- src/constants/vehicle-categories.js | 2 +- .../service-location/shop-question/shop-question.vue | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/constants/vehicle-categories.js b/src/constants/vehicle-categories.js index 8ef3e0134..37ffcf5e1 100644 --- a/src/constants/vehicle-categories.js +++ b/src/constants/vehicle-categories.js @@ -8,4 +8,4 @@ const vehicleCategories = { SEMI: "SEMI", }; -export { vehicleCategories }; \ No newline at end of file +export { vehicleCategories }; diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index c0e2bffe0..0a3e9eefa 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -184,12 +184,7 @@ export default { joinedShops = "no-shops"; } - this.pushEventToGA( - this.GaCategories.SERVICE_LOCATION, - gaAction, - joinedShops, - true - ); + this.pushEventToGA(this.GaCategories.SERVICE_LOCATION, gaAction, joinedShops, true); } if (this.answers.length === 0) { From 21c9607682b5c180289f12fca81068dad0317f68 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 3 Apr 2025 12:26:58 -0400 Subject: [PATCH 12/12] CASH-417 CASH-417 null check --- src/layouts/service-location/service-location.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 758dc88e9..a85a5bd17 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -537,7 +537,7 @@ export default { return store.getters.order.serviceLocation.zipCode; }, getIsVehicleHeavyTruckFromStore() { - return store.getters.order.vehicle.isBigTruck; + return store.getters.order.vehicle?.isBigTruck ?? false; }, getIsVehicleProtectedFromStore() { return store.getters.order.serviceLocation.isVehicleProtected;