From e1c5fc83c446ee1aacbb27688807c23d3a6d6351 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 17 Mar 2025 13:34:40 -0400 Subject: [PATCH 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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,