From 779cf9415a228df5fa2246bd8bb42bf66736e768 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 15 Dec 2025 17:47:38 -0500 Subject: [PATCH 01/13] CASH-1790 another bug fix for no mobile available --- src/layouts/schedule/schedule.vue | 47 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index bee86a537..ca66fed8c 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -24,6 +24,7 @@ { vm.showMobileFirstModal(); + vm.setSelectedDateToFirstAvailable(); }); }); }, @@ -827,13 +829,13 @@ export default { }, estimatedServiceMinutesMinimum() { return this.isMobileSelected - ? this.selectableDatesMobile.estimatedServiceMinutesMinimum - : this.selectableDatesInshop.estimatedServiceMinutesMinimum; + ? this.selectableDatesMobile?.estimatedServiceMinutesMinimum + : this.selectableDatesInshop?.estimatedServiceMinutesMinimum; }, estimatedServiceMinutesMaximum() { return this.isMobileSelected - ? this.selectableDatesMobile.estimatedServiceMinutesMaximum - : this.selectableDatesInshop.estimatedServiceMinutesMaximum; + ? this.selectableDatesMobile?.estimatedServiceMinutesMaximum + : this.selectableDatesInshop?.estimatedServiceMinutesMaximum; }, timeSlotsForSelectedDate() { if (!this.selectedDate) return null; @@ -841,11 +843,11 @@ export default { if (this.isMobileSelected) { const selectedDateString = selectedDate.replace("-mobile", ""); - return this.selectableDatesMobile.days?.find( + return this.selectableDatesMobile?.days?.find( (selectableDate) => selectableDate.date === selectedDateString ); } else { - return this.selectableDatesInshop.days?.find( + return this.selectableDatesInshop?.days?.find( (selectableDate) => selectableDate.date === this.selectedDate ); } @@ -863,7 +865,7 @@ export default { ); }, isMobileFirstModalOpen() { - return this.selectableDatesMobile.days + return this.selectableDatesMobile?.days ? this.$refs.mobileFirstModal?.getIsModalOpen() : false; }, @@ -1015,7 +1017,9 @@ export default { return store.getters.order.serviceLocation.isVehicleProtected; }, getAppointmentTypeFromStore() { - return store.getters.order.serviceLocation.appointmentType; + const appointmentTypeFromStore = store.getters.order.serviceLocation.appointmentType; + this.handleAppointmentTypeChange(appointmentTypeFromStore); + return appointmentTypeFromStore; }, getSelectedProviderFromStore() { return store.getters.order.serviceLocation.provider; @@ -1036,6 +1040,7 @@ export default { this.appointmentType = null; this.selectedProvider = null; this.appointmentTypeFromAppointmentTypeQuestion = null; + this.handleAppointmentTypeChange(); this.preSelectedDate = null; }, setServiceabilityDetails(serviceabilityDetails) { @@ -1288,7 +1293,7 @@ export default { } } */ - this.$refs.navbar.updateButtonText(navbarButtonText); + this.$refs.navbar?.updateButtonText(navbarButtonText); }, convertSelectedDateToShortMonthAndDay(selectedDate) { // This conversion ensures we don't get get GMT induced date changes @@ -1463,9 +1468,12 @@ export default { this.showLoadingModal(); }, setDisplayWaitList() { - const dateString = this.isMobileSelected - ? this.selectableDatesMobile?.days[0]?.date - : this.selectableDatesInshop?.days[0]?.date; + let dateString; + if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) { + dateString = this.selectableDatesMobile.days[0].date; + } else if (this.selectableDatesInshop?.days?.length) { + dateString = this.selectableDatesInshop.days[0].date; + } if ( experimentMixin.methods.hasSettingEqualTo( experimentSettings.DISPLAY_WAITLIST, @@ -1634,9 +1642,9 @@ export default { }, getFirstAvailableDate() { let dateToSelect; - if (this.isMobileSelected) { + if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) { dateToSelect = returnFirstDate(this.selectableDatesMobile); - } else { + } else if (this.selectableDatesInshop?.days?.length) { dateToSelect = returnFirstDate(this.selectableDatesInshop); } if (!dateToSelect) return null; @@ -1846,13 +1854,6 @@ export default { this.forwardButtonAction(); }, }, - watch: { - appointmentTypeFromAppointmentTypeQuestion: { - handler(newValue, oldValue) { - this.handleAppointmentTypeChange(newValue); - }, - }, - }, components: { funnelHeader, navbar, From 8d98a53f0c1e04ba502949bdebe868d2fa839024 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 15 Dec 2025 17:48:46 -0500 Subject: [PATCH 02/13] CASH-1790 prettier change --- src/layouts/schedule/schedule.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index ca66fed8c..7ae428e59 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1473,7 +1473,7 @@ export default { dateString = this.selectableDatesMobile.days[0].date; } else if (this.selectableDatesInshop?.days?.length) { dateString = this.selectableDatesInshop.days[0].date; - } + } if ( experimentMixin.methods.hasSettingEqualTo( experimentSettings.DISPLAY_WAITLIST, From f11e7dd9ec724e7e1ec784c98ee53e7152753044 Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Tue, 16 Dec 2025 13:21:11 -0500 Subject: [PATCH 03/13] CASH-2036: Mobile first popup changes. --- src/layouts/schedule/schedule.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index bee86a537..ff723d9cb 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1793,8 +1793,9 @@ export default { if (firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= pmMobileDays) { preSelectedMobileAppointment = firstMobilePMAppt; } else if ( - firstMobilePMDate && - numberOfDaysToFirstMobilePMDate >= noPMMobileDays + (firstMobilePMDate && + numberOfDaysToFirstMobilePMDate >= noPMMobileDays) || + pmMobileDays == 0 ) { preSelectedMobileAppointment = firstMobileAMAppt ? firstMobileAMAppt @@ -1803,10 +1804,12 @@ export default { (preSelectedMobileAppointment = firstMobilePMAppt); } - this.$refs.mobileFirstModal.setSelectedAppointment( - preSelectedMobileAppointment - ); - this.$refs.mobileFirstModal.openModal(); + if (preSelectedMobileAppointment) { + this.$refs.mobileFirstModal.setSelectedAppointment( + preSelectedMobileAppointment + ); + this.$refs.mobileFirstModal.openModal(); + } } } } From ad69af36a0a482b64cf4dbe29338ae227880ae59 Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Tue, 16 Dec 2025 15:14:47 -0500 Subject: [PATCH 04/13] CASH-2036: If ShowPMMobileDays experiment setting is 0, choose first available appointment --- src/layouts/schedule/schedule.vue | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index ff723d9cb..65eec08d0 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1790,18 +1790,26 @@ export default { } if (this.isShowMobileFirstAppt) { - if (firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= pmMobileDays) { + if (pmMobileDays == 0) { + // Selects the first available time slot + preSelectedMobileAppointment = + numberOfDaysToFirstMobileAMDate < numberOfDaysToFirstMobilePMDate + ? firstMobileAMAppt + : firstMobilePMAppt; + } else if ( + firstMobilePMDate && + numberOfDaysToFirstMobilePMDate <= pmMobileDays + ) { + // Selects the first available PM time slot preSelectedMobileAppointment = firstMobilePMAppt; } else if ( - (firstMobilePMDate && - numberOfDaysToFirstMobilePMDate >= noPMMobileDays) || - pmMobileDays == 0 + firstMobilePMDate && + numberOfDaysToFirstMobilePMDate >= noPMMobileDays ) { + // Selects the first available AM time slot. If none, selects the first available PM time slot preSelectedMobileAppointment = firstMobileAMAppt ? firstMobileAMAppt - : null; - !preSelectedMobileAppointment && - (preSelectedMobileAppointment = firstMobilePMAppt); + : firstMobilePMAppt; } if (preSelectedMobileAppointment) { From dbd7681b4748b598d3a5eac95daa08c63ecab659 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Tue, 16 Dec 2025 16:42:23 -0500 Subject: [PATCH 05/13] CASH-1790 quick fix; missed event emit --- .../appointment-type-question/appointment-type-question.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue index fc4d08b92..924b2e62a 100644 --- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue +++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue @@ -80,6 +80,7 @@ export default { }, set: function (newValue) { this.$emit("update:modelValue", newValue); + this.$emit("handle-appointment-type-change", newValue); }, }, isMobileOnly() { From f78d1c4192b5fe93db51bb279a739f4113a350e3 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 17 Dec 2025 05:38:15 -0500 Subject: [PATCH 06/13] CASH-2037 CASH-2037 change the products logged in the session name to use the part number and part type. Also add the service package selected for the data analytics team. --- src/helpers/service-package-helper.js | 13 +++++++++++++ src/layouts/quote/quote.vue | 7 ++++++- .../service-package-question.vue | 8 ++++++++ src/mixins/analytics-mixin.js | 17 ++++++++++++++++- 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/helpers/service-package-helper.js b/src/helpers/service-package-helper.js index 4144c44e7..d3fc3f01b 100644 --- a/src/helpers/service-package-helper.js +++ b/src/helpers/service-package-helper.js @@ -254,6 +254,19 @@ export function getDiscountedPackageName(discountPackage) { return package_names[discountPackage] || null; } +export function getPackageLabel(packageName) { + switch (packageName) { + case packageNames.TIER_ONE: + return externalParamPackageLabels.GLASS_ONLY; + case packageNames.TIER_TWO: + return externalParamPackageLabels.STANDARD; + case packageNames.TIER_THREE: + return externalParamPackageLabels.PREMIUM; + default: + return null; + } +} + function maxTier(tierA, tierB) { if (tierA === packageNames.TIER_THREE || tierB === packageNames.TIER_THREE) { return packageNames.TIER_THREE; diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 01b585349..26dc1af16 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -33,6 +33,7 @@ @vapsItemsSelected="vapsItemsSelectedAction" @quotePageDiscountSelected="quotePageDiscountSelectedAction" @currentNumberOfPackages="currentNumberOfPackagesAction" + @servicePackageSelected="servicePackageSelectedAction" :servicePackage="servicePackage" :activePromos="lineItems.promos" :availableQuotePageDiscounts="quoteDiscountPartsInfo" @@ -564,6 +565,7 @@ export default { isSaveProgressComplete: null, packageNumber: null, skipToInsurance: null, + servicePackageSelected: null, }; }, async mounted() { @@ -670,6 +672,9 @@ export default { vapsItemsSelectedAction(vapsItemsSelected) { this.lineItems.vaps = vapsItemsSelected; }, + servicePackageSelectedAction(newValue) { + this.servicePackageSelected = newValue; + }, quotePageDiscountSelectedAction(supportingItemsSelected) { this.lineItems.supportingItems = supportingItemsSelected; }, @@ -758,7 +763,7 @@ export default { false ); - await savePageData(this.pageName, { saveProgressPopupSkipped: true }, true); + await savePageData(this.pageName, { saveProgressPopupSkipped: true, servicePackageSelected: this.servicePackageSelected }, true); const payment = this.$store.getters.payment; if (payment.isInsurance) { diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index e45147295..43910c61e 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -34,6 +34,7 @@ import { findLineItemsWithPartType, getPackageNameByType, getDiscountedPackageName, + getPackageLabel, } from "@/helpers/service-package-helper"; import { getPromosThatMatchLineItemsOnOrder, @@ -45,6 +46,7 @@ import { containsRecalParts, getItemsWithoutRecalParts } from "@/helpers/recal-h import experimentMixin from "@/mixins/experiment-mixin.js"; import { experimentSettings } from "@/constants/experiments"; import { savePageData } from "@/router/methods/helpers/save-page-data"; +import { debugLog } from "@/helpers/debug-log-helper"; export default { name: "servicePackageQuestion", @@ -84,6 +86,12 @@ export default { if (this.activePromos?.length) this.selectDefaultPackage(); }, selectedPackageName(newValue) { + debugLog("selectedPackageName:", newValue); + const packageLabel = getPackageLabel(newValue); + + debugLog("getPackageLabel:", packageLabel); + this.$emit("servicePackageSelected", `ServicePackage-${packageLabel}`); + const VapsProductsInSelectedPackage = this.getVapsLineItemsForSelectedPackage(newValue); this.$emit("vapsItemsSelected", VapsProductsInSelectedPackage); const discountPartInSelectedPackage = this.getDiscountPartForSelectedPackage(newValue); diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index a77fe930a..0be50a8be 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -232,6 +232,21 @@ export default { (part) => `${part.glassLocation}-${part.glassName}` ); + const format = (part) => `${part?.partNumber}-${part?.partType ? part.partType : ""}`; + const mapParts = (arr) => (arr ?? []).map(format); + + const glassParts = mapParts(order?.lineItems?.glassParts); + const supportingItems = mapParts(order?.lineItems?.supportingItems); + const vaps = mapParts(order?.lineItems?.vaps); + const childParts = [].concat( + ...(order?.lineItems?.glassParts ?? []).map((gp) => mapParts(gp?.childParts)) + ); + const allParts = [...glassParts, ...supportingItems, ...vaps, ...childParts]; + + if (applicationUser?.pageData?.quote?.servicePackageSelected) { + allParts.push(applicationUser.pageData.quote.servicePackageSelected); + } + var appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`; var sessionData = {}; @@ -251,7 +266,7 @@ export default { ? "Insurance" : "Cash"; sessionData.damageType = order?.damage?.isRepair ? "Repair" : "Replace"; - sessionData.productType = glassProducts; + sessionData.productType = allParts; sessionData.eon = order?.eon; sessionData.referralNumber = order?.referralNumber; sessionData.referralSequenceNumber = order?.referralSequenceNumber; From 882076f259081527ed5bc842b9f7526ffc25565c Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 17 Dec 2025 07:06:17 -0500 Subject: [PATCH 07/13] prettier --- src/layouts/quote/quote.vue | 9 ++++++++- .../service-package-question.vue | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 26dc1af16..dabc39fd7 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -763,7 +763,14 @@ export default { false ); - await savePageData(this.pageName, { saveProgressPopupSkipped: true, servicePackageSelected: this.servicePackageSelected }, true); + await savePageData( + this.pageName, + { + saveProgressPopupSkipped: true, + servicePackageSelected: this.servicePackageSelected, + }, + true + ); const payment = this.$store.getters.payment; if (payment.isInsurance) { diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index 43910c61e..436e98b24 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -88,7 +88,7 @@ export default { selectedPackageName(newValue) { debugLog("selectedPackageName:", newValue); const packageLabel = getPackageLabel(newValue); - + debugLog("getPackageLabel:", packageLabel); this.$emit("servicePackageSelected", `ServicePackage-${packageLabel}`); From cfb8af306c8d574d8280fe3ab5f8dea96a81e41a Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Wed, 17 Dec 2025 12:22:16 -0500 Subject: [PATCH 08/13] CASH-2027 - Add call to oem-after-market-parts endpoint --- src/constants/endpoints.js | 4 +++ src/constants/store-actions.js | 1 + src/layouts/quote/quote.vue | 7 +++++ src/store/index.js | 48 ++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index c1771b3f5..4471b1011 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -216,6 +216,10 @@ const endpoints = { url: "/order/api/v1/order/add-donation-part", method: "POST", }, + GetOemAfterMarketParts: { + url: "/parts/api/v1/parts/oem-after-market-parts", + method: "POST", + }, }; export { endpoints }; diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 513891ea1..2bbfc87fa 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -23,6 +23,7 @@ const storeActions = { GET_ALERT_REASONS_BY_CTU: "getAlertReasonsByCtu", GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions", GET_PARTS: "getParts", + GET_OEM_AFTERMARKET_PARTS: "getOemAfterMarketParts", GET_WIPERS: "getWipers", GET_RAIN_REPEL: "getRainRepel", GET_SUPPORTING_ITEMS: "getSupportingItems", diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index dabc39fd7..5b874ad0c 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -219,6 +219,13 @@ export default { "quote" ); + // call API oem-after-market-parts method + const oemAfterMarketParts = baseMixin.methods.dispatchStoreActionWithLogging( + storeActions.GET_OEM_AFTERMARKET_PARTS, + null, + "quote" + ); + const shouldExposeSkipQuote = store.getters.isRecalibrationOnOrder; const skipQuoteExperiment = store.getters.applicationUser.experiments.find( (e) => e.universeName === experimentUniverses.IGQ_SkipQuote diff --git a/src/store/index.js b/src/store/index.js index ca1d76f6f..b94fe17a8 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1836,6 +1836,54 @@ export const actions = { return response; }, + // Parts API Actions + async getOemAfterMarketParts(context, { pageNameToLog }) { + const vehicle = context.getters.vehicle; + const damage = context.getters.damage; + const order = context.state.order; + + const carId = vehicle.carId; + const glassArray = damage.glassToReplace; + const resultsArray = damage.partQuestionAnswers; + const zipCode = order.serviceLocation.zipCode; + const vin = vehicle.vin; + const make = vehicle.make; + const serviceType = order.serviceLocation?.appointmentType; + const referralSeqNumber = order.referralSequenceNumber; + const parentAccountNumber = applicationConfig.CASH_PARENT_ACCOUNT_NUMBER; + const oemEndorsementFlag = false; // Need to update from the store when available + + // create a new array to avoid mutating state + const glassArrayForPayload = convertGlassPieceNamingForApi(glassArray); + const resultsArrayForPayload = convertResultsForApi(resultsArray); + + const response = await globalMethods.callHttpClient({ + method: endpoints.GetOemAfterMarketParts.method, + endpoint: endpoints.GetOemAfterMarketParts.url, + payload: { + carId: carId, + glassPieces: glassArrayForPayload, + answerResults: resultsArrayForPayload, + zip: zipCode, + vin: vin, + serviceType: serviceType, + referralSeqNumber: referralSeqNumber, + make: make, + parentAccountNumber: parentAccountNumber.toString(), + oemEndorsementFlag: oemEndorsementFlag, + }, + logApiCall: true, + pageNameToLog: pageNameToLog, + }); + + // Flatten location and name properties + response.data.glassPieceParts = convertGlassPieceNamingFromApi( + response.data.glassPieceParts + ); + + return response; + }, + async getWipers(context, { payload, pageNameToLog }) { const carId = payload.carId; const serviceZipCode = payload.serviceZipCode; From dc8d7b4c27f7dec274d3c5586bc5b89504f153cf Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Thu, 18 Dec 2025 10:14:07 -0500 Subject: [PATCH 09/13] CASH-2036: Defect fix --- src/layouts/schedule/schedule.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 6c0b3506f..71ee19d35 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1801,7 +1801,7 @@ export default { if (pmMobileDays == 0) { // Selects the first available time slot preSelectedMobileAppointment = - numberOfDaysToFirstMobileAMDate < numberOfDaysToFirstMobilePMDate + numberOfDaysToFirstMobileAMDate <= numberOfDaysToFirstMobilePMDate ? firstMobileAMAppt : firstMobilePMAppt; } else if ( From fbb5a3eb148a830a4142e23cfb325eb8eb2876a1 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 18 Dec 2025 15:00:30 -0500 Subject: [PATCH 10/13] CASH-2041 CASH-2041 - do not update selected provider if null --- src/layouts/schedule/schedule.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 6c0b3506f..b3c57f2d4 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1731,7 +1731,9 @@ export default { this.appointmentType = AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF; } // make sure a selectedProvider exists - this.updateSelectedProvider(this.lastSelectedInshopOrDropoffProvider); + if (this.lastSelectedInshopOrDropoffProvider) { + this.updateSelectedProvider(this.lastSelectedInshopOrDropoffProvider); + } } else { this.appointmentType = null; } From d364ab794a302a1117d96921df411ea85817e849 Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Thu, 18 Dec 2025 15:27:02 -0500 Subject: [PATCH 11/13] CASH-1762: Decom Service Package Discount endpoint --- public/static/healthcheck/index.html | 1 - src/constants/endpoints.js | 4 ---- src/constants/store-actions.js | 1 - src/store/index.js | 20 -------------------- 4 files changed, 26 deletions(-) diff --git a/public/static/healthcheck/index.html b/public/static/healthcheck/index.html index 52e21bb5b..3f87a7587 100644 --- a/public/static/healthcheck/index.html +++ b/public/static/healthcheck/index.html @@ -545,7 +545,6 @@ { path: '/parts/parts-or-questions', method: 'POST', body: {"carId":"CR00046193","glassPieces":[{"location":"Windshield","name":"Single"}],"zip":"43015","vin":null,"serviceType":null,"referralSeqNumber":environmentContext.referralNumber,"AppName":"FixMyGlass"} }, { path: '/parts/wipers/CR00046193/43015', method: 'GET' }, { path: '/parts/mobile-premium-fee/Cash/Replace', method: 'GET' }, - { path: '/parts/service-package-discount', method: 'POST', body: {"glassPieces":[{"location":"Windshield","name":"Single"}],"damageType":"Replace","AppName":"FixMyGlass"} }, { path: '/parts/mobile-fee/?serviceType=Install&facilityType=Mobile&parentAccountNumber=167132&billToAccountNumber=87291&providerNumber=03357&isItacOptimized=false&zipCode=43015', method: 'GET' }, ] }, diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 4471b1011..ba11ad3a1 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -76,10 +76,6 @@ const endpoints = { url: "/parts/api/v1/parts/pricing-by-day-part-number", method: "GET", }, - GetServicePackageDiscountPart: { - url: "/parts/api/v1/parts/service-package-discount", - method: "POST", - }, GetServiceabilityDetails: { url: "/location/api/v1/location/serviceability-details", method: "GET", diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 2bbfc87fa..e09a4c78b 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -33,7 +33,6 @@ const storeActions = { GET_MOLDING_QUESTIONS: "getMoldingQuestions", GET_MOBILE_FEE_PART: "getMobileFeePart", GET_PRICING_BY_DAY_PART: "getPricingByDayPart", - GET_SERVICE_PACKAGE_DISCOUNT_PART: "getServicePackageDiscountPart", GET_SERVICEABILITY_DETAILS: "getServiceabilityDetails", GET_SHOP_TIME_SLOTS: "getShopTimeSlots", GET_MOBILE_TIME_SLOTS: "getMobileTimeSlots", diff --git a/src/store/index.js b/src/store/index.js index b94fe17a8..7bd428eb8 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1984,26 +1984,6 @@ export const actions = { return response; }); }, - getServicePackageDiscountPart(context, { pageNameToLog }) { - const damage = context.getters.damage; - const damageType = damage.isRepair ? "Repair" : "Replace"; - const glassPieces = convertGlassPieceNamingForApi(damage.glassToReplace); - - return globalMethods - .callHttpClient({ - method: endpoints.GetServicePackageDiscountPart.method, - endpoint: endpoints.GetServicePackageDiscountPart.url, - payload: { - glassPieces: glassPieces, - damageType: damageType, - }, - logApiCall: true, - pageNameToLog: pageNameToLog, - }) - .then((response) => { - return response; - }); - }, getServiceabilityDetails(context, { payload: { serviceZipCode }, pageNameToLog }) { const escapeRecalibrationType = (rt) => rt.split("&").join("%26"); From 6b31329637c3f255d823422242f513fe3c0f901c Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 19 Dec 2025 09:47:31 -0500 Subject: [PATCH 12/13] CASH-2041 CASH-2041 --- src/constants/experiments.js | 1 + src/layouts/quote/quote.vue | 14 ++++++++++---- src/layouts/schedule/schedule.vue | 2 ++ src/store/index.js | 8 +++++--- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/constants/experiments.js b/src/constants/experiments.js index f358fc89f..bec7c9a39 100644 --- a/src/constants/experiments.js +++ b/src/constants/experiments.js @@ -33,6 +33,7 @@ const experimentSettings = { SHOW_PM_MOBILE_DAYS: "Show_PMmobileDays", SHOW_NO_PM_MOBILE_DAYS: "Show_NoPMmobileDays", SHOW_NO_MOBILE_AVAILABLE_DAYS: "Show_NoMobileAvailableDays", + OFFER_OEM: "OfferOem", }; const experimentTriggers = { diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 5b874ad0c..b08e9ed72 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -220,11 +220,17 @@ export default { ); // call API oem-after-market-parts method - const oemAfterMarketParts = baseMixin.methods.dispatchStoreActionWithLogging( - storeActions.GET_OEM_AFTERMARKET_PARTS, - null, - "quote" + const offerOem = experimentMixin.methods.hasSettingEqualTo( + experimentSettings.OFFER_OEM, + "true" ); + if (offerOem) { + const oemAfterMarketParts = baseMixin.methods.dispatchStoreActionWithLogging( + storeActions.GET_OEM_AFTERMARKET_PARTS, + null, + "quote" + ); + } const shouldExposeSkipQuote = store.getters.isRecalibrationOnOrder; const skipQuoteExperiment = store.getters.applicationUser.experiments.find( diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 80443d79d..c0bdb7e68 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1655,6 +1655,8 @@ export default { this.updateSelectedProvider(); }, updateSelectedProvider(newShopProvider) { + if (!this.appointmentTypeStrings) return; + if (newShopProvider) { this.selectedProvider = newShopProvider; } else if (this.appointmentType === this.appointmentTypeStrings.MOBILE) { diff --git a/src/store/index.js b/src/store/index.js index b94fe17a8..409818a40 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1877,9 +1877,11 @@ export const actions = { }); // Flatten location and name properties - response.data.glassPieceParts = convertGlassPieceNamingFromApi( - response.data.glassPieceParts - ); + if (response?.data?.glassPieceParts) { + response.data.glassPieceParts = convertGlassPieceNamingFromApi( + response.data.glassPieceParts + ); + } return response; }, From 7ced4f8d7643f85af297bcaf1a6a7233b8b19d76 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 22 Dec 2025 13:28:29 -0500 Subject: [PATCH 13/13] Revert "Merge pull request #2970 from Safelite/feature/CASH-1790-refactor-1" This reverts commit a9c7ba7c9c8b1c6c3f9e9997ff1bcf242bc2e477, reversing changes made to 4523490776778a98b54db9e69617acb9cd9d1f68. --- src/layouts/schedule/schedule.vue | 47 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index c0bdb7e68..187a9de62 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -24,7 +24,6 @@ { vm.showMobileFirstModal(); - vm.setSelectedDateToFirstAvailable(); }); }); }, @@ -829,13 +827,13 @@ export default { }, estimatedServiceMinutesMinimum() { return this.isMobileSelected - ? this.selectableDatesMobile?.estimatedServiceMinutesMinimum - : this.selectableDatesInshop?.estimatedServiceMinutesMinimum; + ? this.selectableDatesMobile.estimatedServiceMinutesMinimum + : this.selectableDatesInshop.estimatedServiceMinutesMinimum; }, estimatedServiceMinutesMaximum() { return this.isMobileSelected - ? this.selectableDatesMobile?.estimatedServiceMinutesMaximum - : this.selectableDatesInshop?.estimatedServiceMinutesMaximum; + ? this.selectableDatesMobile.estimatedServiceMinutesMaximum + : this.selectableDatesInshop.estimatedServiceMinutesMaximum; }, timeSlotsForSelectedDate() { if (!this.selectedDate) return null; @@ -843,11 +841,11 @@ export default { if (this.isMobileSelected) { const selectedDateString = selectedDate.replace("-mobile", ""); - return this.selectableDatesMobile?.days?.find( + return this.selectableDatesMobile.days?.find( (selectableDate) => selectableDate.date === selectedDateString ); } else { - return this.selectableDatesInshop?.days?.find( + return this.selectableDatesInshop.days?.find( (selectableDate) => selectableDate.date === this.selectedDate ); } @@ -865,7 +863,7 @@ export default { ); }, isMobileFirstModalOpen() { - return this.selectableDatesMobile?.days + return this.selectableDatesMobile.days ? this.$refs.mobileFirstModal?.getIsModalOpen() : false; }, @@ -1017,9 +1015,7 @@ export default { return store.getters.order.serviceLocation.isVehicleProtected; }, getAppointmentTypeFromStore() { - const appointmentTypeFromStore = store.getters.order.serviceLocation.appointmentType; - this.handleAppointmentTypeChange(appointmentTypeFromStore); - return appointmentTypeFromStore; + return store.getters.order.serviceLocation.appointmentType; }, getSelectedProviderFromStore() { return store.getters.order.serviceLocation.provider; @@ -1040,7 +1036,6 @@ export default { this.appointmentType = null; this.selectedProvider = null; this.appointmentTypeFromAppointmentTypeQuestion = null; - this.handleAppointmentTypeChange(); this.preSelectedDate = null; }, setServiceabilityDetails(serviceabilityDetails) { @@ -1293,7 +1288,7 @@ export default { } } */ - this.$refs.navbar?.updateButtonText(navbarButtonText); + this.$refs.navbar.updateButtonText(navbarButtonText); }, convertSelectedDateToShortMonthAndDay(selectedDate) { // This conversion ensures we don't get get GMT induced date changes @@ -1468,12 +1463,9 @@ export default { this.showLoadingModal(); }, setDisplayWaitList() { - let dateString; - if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) { - dateString = this.selectableDatesMobile.days[0].date; - } else if (this.selectableDatesInshop?.days?.length) { - dateString = this.selectableDatesInshop.days[0].date; - } + const dateString = this.isMobileSelected + ? this.selectableDatesMobile?.days[0]?.date + : this.selectableDatesInshop?.days[0]?.date; if ( experimentMixin.methods.hasSettingEqualTo( experimentSettings.DISPLAY_WAITLIST, @@ -1642,9 +1634,9 @@ export default { }, getFirstAvailableDate() { let dateToSelect; - if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) { + if (this.isMobileSelected) { dateToSelect = returnFirstDate(this.selectableDatesMobile); - } else if (this.selectableDatesInshop?.days?.length) { + } else { dateToSelect = returnFirstDate(this.selectableDatesInshop); } if (!dateToSelect) return null; @@ -1869,6 +1861,13 @@ export default { this.forwardButtonAction(); }, }, + watch: { + appointmentTypeFromAppointmentTypeQuestion: { + handler(newValue, oldValue) { + this.handleAppointmentTypeChange(newValue); + }, + }, + }, components: { funnelHeader, navbar,