Merge pull request #2998 from Safelite/rslmerge/2026.01.08-to-develop

Rslmerge/2026.01.08 to develop
This commit is contained in:
CarlNation 2026-01-08 13:28:14 -05:00 committed by GitHub
commit 314415c29a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 214 additions and 69 deletions

View file

@ -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/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/wipers/CR00046193/43015', method: 'GET' },
{ path: '/parts/mobile-premium-fee/Cash/Replace', 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' }, { path: '/parts/mobile-fee/?serviceType=Install&facilityType=Mobile&parentAccountNumber=167132&billToAccountNumber=87291&providerNumber=03357&isItacOptimized=false&zipCode=43015', method: 'GET' },
] ]
}, },

View file

@ -14,6 +14,7 @@ const GaCategories = {
EVOX: "Evox", EVOX: "Evox",
APPOINTMENT: "Appointment", APPOINTMENT: "Appointment",
SERVICE_LOCATION: "service-location", SERVICE_LOCATION: "service-location",
CONFIRMATION_CLICKED: "confirmation clicked",
}; };
const GaActions = { const GaActions = {
@ -26,6 +27,8 @@ const GaActions = {
MOBILE_AVAILABLE: "mobile_available", MOBILE_AVAILABLE: "mobile_available",
SHOPS_FIRST_DISPLAYED: "shops_first_displayed", SHOPS_FIRST_DISPLAYED: "shops_first_displayed",
MORE_LOCATIONS_CLICKED: "more_locations_clicked", MORE_LOCATIONS_CLICKED: "more_locations_clicked",
YES: "yes",
NO: "no",
}; };
const GaLabels = { const GaLabels = {

View file

@ -76,10 +76,6 @@ const endpoints = {
url: "/parts/api/v1/parts/pricing-by-day-part-number", url: "/parts/api/v1/parts/pricing-by-day-part-number",
method: "GET", method: "GET",
}, },
GetServicePackageDiscountPart: {
url: "/parts/api/v1/parts/service-package-discount",
method: "POST",
},
GetServiceabilityDetails: { GetServiceabilityDetails: {
url: "/location/api/v1/location/serviceability-details", url: "/location/api/v1/location/serviceability-details",
method: "GET", method: "GET",
@ -216,6 +212,10 @@ const endpoints = {
url: "/order/api/v1/order/add-donation-part", url: "/order/api/v1/order/add-donation-part",
method: "POST", method: "POST",
}, },
GetOemAfterMarketParts: {
url: "/parts/api/v1/parts/oem-after-market-parts",
method: "POST",
},
InitializeAdyenPayment: { InitializeAdyenPayment: {
url: "/payment/api/v1/payment/payment/session/initialize-session", url: "/payment/api/v1/payment/payment/session/initialize-session",
method: "POST", method: "POST",

View file

@ -33,6 +33,7 @@ const experimentSettings = {
SHOW_PM_MOBILE_DAYS: "Show_PMmobileDays", SHOW_PM_MOBILE_DAYS: "Show_PMmobileDays",
SHOW_NO_PM_MOBILE_DAYS: "Show_NoPMmobileDays", SHOW_NO_PM_MOBILE_DAYS: "Show_NoPMmobileDays",
SHOW_NO_MOBILE_AVAILABLE_DAYS: "Show_NoMobileAvailableDays", SHOW_NO_MOBILE_AVAILABLE_DAYS: "Show_NoMobileAvailableDays",
OFFER_OEM: "OfferOem",
USE_ADYEN_PAYMENT: "UseAdyenPayment", USE_ADYEN_PAYMENT: "UseAdyenPayment",
}; };

View file

@ -23,6 +23,7 @@ const storeActions = {
GET_ALERT_REASONS_BY_CTU: "getAlertReasonsByCtu", GET_ALERT_REASONS_BY_CTU: "getAlertReasonsByCtu",
GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions", GET_PARTS_OR_QUESTIONS: "getPartsOrQuestions",
GET_PARTS: "getParts", GET_PARTS: "getParts",
GET_OEM_AFTERMARKET_PARTS: "getOemAfterMarketParts",
GET_WIPERS: "getWipers", GET_WIPERS: "getWipers",
GET_RAIN_REPEL: "getRainRepel", GET_RAIN_REPEL: "getRainRepel",
GET_SUPPORTING_ITEMS: "getSupportingItems", GET_SUPPORTING_ITEMS: "getSupportingItems",
@ -32,7 +33,6 @@ const storeActions = {
GET_MOLDING_QUESTIONS: "getMoldingQuestions", GET_MOLDING_QUESTIONS: "getMoldingQuestions",
GET_MOBILE_FEE_PART: "getMobileFeePart", GET_MOBILE_FEE_PART: "getMobileFeePart",
GET_PRICING_BY_DAY_PART: "getPricingByDayPart", GET_PRICING_BY_DAY_PART: "getPricingByDayPart",
GET_SERVICE_PACKAGE_DISCOUNT_PART: "getServicePackageDiscountPart",
GET_SERVICEABILITY_DETAILS: "getServiceabilityDetails", GET_SERVICEABILITY_DETAILS: "getServiceabilityDetails",
GET_SHOP_TIME_SLOTS: "getShopTimeSlots", GET_SHOP_TIME_SLOTS: "getShopTimeSlots",
GET_MOBILE_TIME_SLOTS: "getMobileTimeSlots", GET_MOBILE_TIME_SLOTS: "getMobileTimeSlots",

View file

@ -466,7 +466,7 @@ export default {
const response = config.getSelectableDatesCallback({ const response = config.getSelectableDatesCallback({
startDateString: initialViewStartDate, startDateString: initialViewStartDate,
endDateString: initialViewEndDate, endDateString: initialViewEndDate,
providerNumber: config.providerNumber, inshopProviderNumber: config.inshopProviderNumber,
zipCode: config.zipCode, zipCode: config.zipCode,
includeMobileTimeSlots: config.includeMobileTimeSlots, includeMobileTimeSlots: config.includeMobileTimeSlots,
includeInshopTimeSlots: config.includeInshopTimeSlots, includeInshopTimeSlots: config.includeInshopTimeSlots,

View file

@ -160,6 +160,10 @@ export default {
return this.staticBackdrop ? "static" : "true"; return this.staticBackdrop ? "static" : "true";
}, },
}, },
unmounted() {
// remove any modal effects before leaving page (e.g. user hits browser back button)
this.closeModal();
},
components: { components: {
modalButtonMain, modalButtonMain,
}, },

View file

@ -57,10 +57,6 @@ export default {
modalWidgetName: String, modalWidgetName: String,
pageName: String, pageName: String,
}, },
unmounted() {
// remove any modal effects before leaving page (e.g. user hits browser back button)
this.modal?.closeModal();
},
computed: { computed: {
buttonText() { buttonText() {
return this.getCmsContent(this.modalWidgetName, "SubheaderText"); return this.getCmsContent(this.modalWidgetName, "SubheaderText");

View file

@ -54,10 +54,6 @@ export default {
mounted() { mounted() {
if (this.showSaveProgressPopup) this.modal.openModal(); if (this.showSaveProgressPopup) this.modal.openModal();
}, },
unmounted() {
// remove any modal effects before leaving page (e.g. user hits browser back button)
this.modal.closeModal();
},
emits: ["close-save-progress-popup", "save-progress"], // <--- should remove oodles of warnings in dev tools emits: ["close-save-progress-popup", "save-progress"], // <--- should remove oodles of warnings in dev tools
props: { props: {
modelValue: Object, modelValue: Object,

View file

@ -254,6 +254,19 @@ export function getDiscountedPackageName(discountPackage) {
return package_names[discountPackage] || null; 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) { function maxTier(tierA, tierB) {
if (tierA === packageNames.TIER_THREE || tierB === packageNames.TIER_THREE) { if (tierA === packageNames.TIER_THREE || tierB === packageNames.TIER_THREE) {
return packageNames.TIER_THREE; return packageNames.TIER_THREE;

View file

@ -25,6 +25,11 @@
cmsWidgetName="PleaseProvideAddressWidget" cmsWidgetName="PleaseProvideAddressWidget"
class="provide-address-header" /> class="provide-address-header" />
<textBlock <textBlock
v-if="isMSRFeeApplicable()"
cmsWidgetName="VehicleKeysMSRMessageWidget"
class="keys-message" />
<textBlock
v-else
cmsWidgetName="VehicleKeysMessageWidget" cmsWidgetName="VehicleKeysMessageWidget"
class="keys-message" /> class="keys-message" />
<mobileAddressQuestions <mobileAddressQuestions
@ -143,6 +148,9 @@ export default {
getIsVehicleProtectedFromStore() { getIsVehicleProtectedFromStore() {
return store.getters.order.serviceLocation.isVehicleProtected; return store.getters.order.serviceLocation.isVehicleProtected;
}, },
isMSRFeeApplicable() {
return store.getters.order.isMSRFeeApplicable;
},
async forwardButtonAction() { async forwardButtonAction() {
await this.dispatchStoreAction( await this.dispatchStoreAction(
this.storeActions.SAVE_MOBILE_DETAILS, this.storeActions.SAVE_MOBILE_DETAILS,

View file

@ -253,9 +253,10 @@ export default {
height: 40px; height: 40px;
} }
h3 { h3 {
font-family: UrbanistSemibold; font-family: UrbanistBold;
font-size: 1rem; font-size: 1rem;
margin: 0 0 0 0.5rem; margin: 0 0 0 0.5rem;
color: $black;
} }
} }
p { p {

View file

@ -33,6 +33,7 @@
@vapsItemsSelected="vapsItemsSelectedAction" @vapsItemsSelected="vapsItemsSelectedAction"
@quotePageDiscountSelected="quotePageDiscountSelectedAction" @quotePageDiscountSelected="quotePageDiscountSelectedAction"
@currentNumberOfPackages="currentNumberOfPackagesAction" @currentNumberOfPackages="currentNumberOfPackagesAction"
@servicePackageSelected="servicePackageSelectedAction"
:servicePackage="servicePackage" :servicePackage="servicePackage"
:activePromos="lineItems.promos" :activePromos="lineItems.promos"
:availableQuotePageDiscounts="quoteDiscountPartsInfo" :availableQuotePageDiscounts="quoteDiscountPartsInfo"
@ -218,6 +219,19 @@ export default {
"quote" "quote"
); );
// call API oem-after-market-parts method
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 shouldExposeSkipQuote = store.getters.isRecalibrationOnOrder;
const skipQuoteExperiment = store.getters.applicationUser.experiments.find( const skipQuoteExperiment = store.getters.applicationUser.experiments.find(
(e) => e.universeName === experimentUniverses.IGQ_SkipQuote (e) => e.universeName === experimentUniverses.IGQ_SkipQuote
@ -564,6 +578,7 @@ export default {
isSaveProgressComplete: null, isSaveProgressComplete: null,
packageNumber: null, packageNumber: null,
skipToInsurance: null, skipToInsurance: null,
servicePackageSelected: null,
}; };
}, },
async mounted() { async mounted() {
@ -670,6 +685,9 @@ export default {
vapsItemsSelectedAction(vapsItemsSelected) { vapsItemsSelectedAction(vapsItemsSelected) {
this.lineItems.vaps = vapsItemsSelected; this.lineItems.vaps = vapsItemsSelected;
}, },
servicePackageSelectedAction(newValue) {
this.servicePackageSelected = newValue;
},
quotePageDiscountSelectedAction(supportingItemsSelected) { quotePageDiscountSelectedAction(supportingItemsSelected) {
this.lineItems.supportingItems = supportingItemsSelected; this.lineItems.supportingItems = supportingItemsSelected;
}, },
@ -758,7 +776,14 @@ export default {
false false
); );
await savePageData(this.pageName, { saveProgressPopupSkipped: true }, true); await savePageData(
this.pageName,
{
saveProgressPopupSkipped: true,
servicePackageSelected: this.servicePackageSelected,
},
true
);
const payment = this.$store.getters.payment; const payment = this.$store.getters.payment;
if (payment.isInsurance) { if (payment.isInsurance) {

View file

@ -34,6 +34,7 @@ import {
findLineItemsWithPartType, findLineItemsWithPartType,
getPackageNameByType, getPackageNameByType,
getDiscountedPackageName, getDiscountedPackageName,
getPackageLabel,
} from "@/helpers/service-package-helper"; } from "@/helpers/service-package-helper";
import { import {
getPromosThatMatchLineItemsOnOrder, getPromosThatMatchLineItemsOnOrder,
@ -45,6 +46,7 @@ import { containsRecalParts, getItemsWithoutRecalParts } from "@/helpers/recal-h
import experimentMixin from "@/mixins/experiment-mixin.js"; import experimentMixin from "@/mixins/experiment-mixin.js";
import { experimentSettings } from "@/constants/experiments"; import { experimentSettings } from "@/constants/experiments";
import { savePageData } from "@/router/methods/helpers/save-page-data"; import { savePageData } from "@/router/methods/helpers/save-page-data";
import { debugLog } from "@/helpers/debug-log-helper";
export default { export default {
name: "servicePackageQuestion", name: "servicePackageQuestion",
@ -84,6 +86,12 @@ export default {
if (this.activePromos?.length) this.selectDefaultPackage(); if (this.activePromos?.length) this.selectDefaultPackage();
}, },
selectedPackageName(newValue) { selectedPackageName(newValue) {
debugLog("selectedPackageName:", newValue);
const packageLabel = getPackageLabel(newValue);
debugLog("getPackageLabel:", packageLabel);
this.$emit("servicePackageSelected", `ServicePackage-${packageLabel}`);
const VapsProductsInSelectedPackage = this.getVapsLineItemsForSelectedPackage(newValue); const VapsProductsInSelectedPackage = this.getVapsLineItemsForSelectedPackage(newValue);
this.$emit("vapsItemsSelected", VapsProductsInSelectedPackage); this.$emit("vapsItemsSelected", VapsProductsInSelectedPackage);
const discountPartInSelectedPackage = this.getDiscountPartForSelectedPackage(newValue); const discountPartInSelectedPackage = this.getDiscountPartForSelectedPackage(newValue);

View file

@ -50,7 +50,7 @@ export default {
data() { data() {
return { return {
isModalOpen: false, isModalOpen: false,
selectedAppontment: { selectedAppointment: {
estimatedServiceMinutes: { estimatedServiceMinutes: {
minimum: null, minimum: null,
maximum: null, maximum: null,
@ -58,6 +58,7 @@ export default {
timeSlot: null, timeSlot: null,
date: null, date: null,
}, },
confirmedAppointment: false,
}; };
}, },
methods: { methods: {
@ -67,22 +68,25 @@ export default {
this.modal.openModal(); this.modal.openModal();
}, },
onModalClosed() { onModalClosed() {
this.pushEvent();
this.$emit("close-mobile-first-modal"); this.$emit("close-mobile-first-modal");
this.confirmedAppointment = false;
}, },
closeModal() { closeModal() {
this.modal.closeModal(); this.modal.closeModal();
}, },
confirmAppointment() { confirmAppointment() {
let selectedTimeSlot = { let selectedTimeSlot = {
timeSlot: this.selectedAppontment.timeSlot, timeSlot: this.selectedAppointment.timeSlot,
routeCode: this.selectedAppontment.timeSlot.id, routeCode: this.selectedAppointment.timeSlot.id,
date: this.selectedAppontment.date, date: this.selectedAppointment.date,
}; };
this.confirmedAppointment = true;
this.$emit("confirm-appointment", selectedTimeSlot); this.$emit("confirm-appointment", selectedTimeSlot);
this.modal.closeModal(); this.modal.closeModal();
}, },
setSelectedAppointment(appointment) { setSelectedAppointment(appointment) {
this.selectedAppontment = appointment; this.selectedAppointment = appointment;
}, },
getIsModalOpen() { getIsModalOpen() {
return this.isModalOpen; return this.isModalOpen;
@ -90,6 +94,21 @@ export default {
setIsModalOpen(isOpen) { setIsModalOpen(isOpen) {
this.isModalOpen = isOpen; this.isModalOpen = isOpen;
}, },
pushEvent() {
let gaAction = this.confirmedAppointment ? this.GaActions.YES : this.GaActions.NO;
if (this.selectedAppointment && this.selectedAppointment.timeSlot) {
this.pushEventToGA(
this.GaCategories.CONFIRMATION_CLICKED,
gaAction,
this.selectedAppointment.timeSlot.startTime +
"-" +
this.selectedAppointment.timeSlot.endTime +
" " +
this.selectedAppointment.date,
true
);
}
},
}, },
computed: { computed: {
modalName() { modalName() {
@ -112,37 +131,37 @@ export default {
if (token.includes(INLINE_SERVICETYPE_TOKEN)) { if (token.includes(INLINE_SERVICETYPE_TOKEN)) {
const serviceType = "<strong>" + this.getServiceType + "</strong>"; const serviceType = "<strong>" + this.getServiceType + "</strong>";
tokens.splice(tokens.indexOf(token), 1, serviceType); tokens.splice(tokens.indexOf(token), 1, serviceType);
} else if (token.includes(INLINE_DAY_TOKEN) && this.selectedAppontment.date) { } else if (token.includes(INLINE_DAY_TOKEN) && this.selectedAppointment.date) {
const day = const day =
"<strong>" + "<strong>" +
new Date(this.selectedAppontment.date).toLocaleDateString("en-US", { new Date(this.selectedAppointment.date).toLocaleDateString("en-US", {
weekday: "long", weekday: "long",
timeZone: "UTC", timeZone: "UTC",
}) + }) +
"</strong>"; "</strong>";
tokens.splice(tokens.indexOf(token), 1, day); tokens.splice(tokens.indexOf(token), 1, day);
} else if (token.includes(INLINE_DATE_TOKEN) && this.selectedAppontment.date) { } else if (token.includes(INLINE_DATE_TOKEN) && this.selectedAppointment.date) {
const date = new Date(this.selectedAppontment.date).toLocaleDateString( const date = new Date(this.selectedAppointment.date).toLocaleDateString(
"en-US", "en-US",
{ timeZone: "UTC", weekday: "long", month: "long", day: "numeric" } { timeZone: "UTC", weekday: "long", month: "long", day: "numeric" }
); );
tokens.splice(tokens.indexOf(token), 1, date); tokens.splice(tokens.indexOf(token), 1, date);
} else if ( } else if (
token.includes(INLINE_TIMESLOT_TOKEN) && token.includes(INLINE_TIMESLOT_TOKEN) &&
this.selectedAppontment.timeSlot this.selectedAppointment.timeSlot
) { ) {
const timeslot = const timeslot =
this.get12HourTimeFormat(this.selectedAppontment.timeSlot.startTime) + this.get12HourTimeFormat(this.selectedAppointment.timeSlot.startTime) +
" - " + " - " +
this.get12HourTimeFormat(this.selectedAppontment.timeSlot.endTime); this.get12HourTimeFormat(this.selectedAppointment.timeSlot.endTime);
tokens.splice(tokens.indexOf(token), 1, timeslot); tokens.splice(tokens.indexOf(token), 1, timeslot);
} else if ( } else if (
token.includes(INLINE_SERVICE_LENGTH_TOKEN) && token.includes(INLINE_SERVICE_LENGTH_TOKEN) &&
this.selectedAppontment.estimatedServiceMinutes this.selectedAppointment.estimatedServiceMinutes
) { ) {
const inshopDurationTime = getDisplayTextForDurationLength( const inshopDurationTime = getDisplayTextForDurationLength(
this.selectedAppontment.estimatedServiceMinutes.minimum, this.selectedAppointment.estimatedServiceMinutes.minimum,
this.selectedAppontment.estimatedServiceMinutes.maximum this.selectedAppointment.estimatedServiceMinutes.maximum
); );
tokens.splice(tokens.indexOf(token), 1, inshopDurationTime); tokens.splice(tokens.indexOf(token), 1, inshopDurationTime);
} }

View file

@ -286,6 +286,7 @@ const getScheduleApiResponse = async ({
startDateString, startDateString,
endDateString, endDateString,
providerNumber, providerNumber,
inshopProviderNumber,
zipCode, zipCode,
includeMobileTimeSlots = true, includeMobileTimeSlots = true,
includeInshopTimeSlots = true, includeInshopTimeSlots = true,
@ -328,7 +329,7 @@ const getScheduleApiResponse = async ({
startDate: apiStartDate, startDate: apiStartDate,
endDate: apiEndDate, endDate: apiEndDate,
shopAppointmentType: "InshopOrDropoff", shopAppointmentType: "InshopOrDropoff",
providerNumber: providerNumber, providerNumber: inshopProviderNumber,
}, },
}; };
if (apiStartDate < apiEndDate) { if (apiStartDate < apiEndDate) {
@ -632,6 +633,9 @@ export default {
return this.isGlassServiceableMobile; return this.isGlassServiceableMobile;
} }
}, },
closestInshopProviderNumber() {
return this.shopProviderData?.shopProviders[0]?.providerNumber;
},
showTimeSlotQuestion() { showTimeSlotQuestion() {
if ( if (
this.selectedDate && this.selectedDate &&
@ -1166,6 +1170,9 @@ export default {
startDateString: startDate, startDateString: startDate,
endDateString: endDate, endDateString: endDate,
providerNumber: this.selectedProvider?.providerNumber, providerNumber: this.selectedProvider?.providerNumber,
inshopProviderNumber: this.isMobileSelected
? this.closestInshopProviderNumber
: this.selectedProvider?.providerNumber,
zipCode: this.zipCode, zipCode: this.zipCode,
includeMobileTimeSlots: this.isServiceableMobile, includeMobileTimeSlots: this.isServiceableMobile,
includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff, includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff,
@ -1194,6 +1201,9 @@ export default {
getSelectableDatesCallback: getScheduleApiResponse, getSelectableDatesCallback: getScheduleApiResponse,
preSelectedDate: this.preSelectedDate, preSelectedDate: this.preSelectedDate,
providerNumber: this.selectedProvider?.providerNumber, providerNumber: this.selectedProvider?.providerNumber,
inshopProviderNumber: this.isMobileSelected
? this.closestInshopProviderNumber
: this.selectedProvider?.providerNumber,
zipCode: this.zipCode, zipCode: this.zipCode,
includeMobileTimeSlots: includeMobileTimeSlots, includeMobileTimeSlots: includeMobileTimeSlots,
includeInshopTimeSlots: includeInshopTimeSlots, includeInshopTimeSlots: includeInshopTimeSlots,
@ -1655,6 +1665,8 @@ export default {
this.updateSelectedProvider(); this.updateSelectedProvider();
}, },
updateSelectedProvider(newShopProvider) { updateSelectedProvider(newShopProvider) {
if (!this.appointmentTypeStrings) return;
if (newShopProvider) { if (newShopProvider) {
this.selectedProvider = newShopProvider; this.selectedProvider = newShopProvider;
} else if (this.appointmentType === this.appointmentTypeStrings.MOBILE) { } else if (this.appointmentType === this.appointmentTypeStrings.MOBILE) {
@ -1731,7 +1743,11 @@ export default {
this.appointmentType = AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF; this.appointmentType = AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF;
} }
// make sure a selectedProvider exists // make sure a selectedProvider exists
this.updateSelectedProvider(this.lastSelectedInshopOrDropoffProvider); if (this.lastSelectedInshopOrDropoffProvider) {
this.updateSelectedProvider(this.lastSelectedInshopOrDropoffProvider);
} else {
this.updateSelectedProvider();
}
} else { } else {
this.appointmentType = null; this.appointmentType = null;
} }
@ -1798,23 +1814,34 @@ export default {
} }
if (this.isShowMobileFirstAppt) { 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; preSelectedMobileAppointment = firstMobilePMAppt;
} else if ( } else if (
firstMobilePMDate && firstMobilePMDate &&
numberOfDaysToFirstMobilePMDate >= noPMMobileDays numberOfDaysToFirstMobilePMDate >= noPMMobileDays
) { ) {
// Selects the first available AM time slot. If none, selects the first available PM time slot
preSelectedMobileAppointment = firstMobileAMAppt preSelectedMobileAppointment = firstMobileAMAppt
? firstMobileAMAppt ? firstMobileAMAppt
: null; : firstMobilePMAppt;
!preSelectedMobileAppointment &&
(preSelectedMobileAppointment = firstMobilePMAppt);
} }
this.$refs.mobileFirstModal.setSelectedAppointment( if (preSelectedMobileAppointment) {
preSelectedMobileAppointment this.$refs.mobileFirstModal.setSelectedAppointment(
); preSelectedMobileAppointment
this.$refs.mobileFirstModal.openModal(); );
this.$refs.mobileFirstModal.openModal();
}
} }
} }
} }

View file

@ -548,9 +548,6 @@ export default {
} }
}, },
}, },
unmounted() {
if (this.isModalOpened) this.closeModal();
},
watch: { watch: {
waitListRequested(newVal) { waitListRequested(newVal) {
if (newVal) { if (newVal) {

View file

@ -232,6 +232,21 @@ export default {
(part) => `${part.glassLocation}-${part.glassName}` (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 appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`;
var sessionData = {}; var sessionData = {};
@ -251,7 +266,7 @@ export default {
? "Insurance" ? "Insurance"
: "Cash"; : "Cash";
sessionData.damageType = order?.damage?.isRepair ? "Repair" : "Replace"; sessionData.damageType = order?.damage?.isRepair ? "Repair" : "Replace";
sessionData.productType = glassProducts; sessionData.productType = allParts;
sessionData.eon = order?.eon; sessionData.eon = order?.eon;
sessionData.referralNumber = order?.referralNumber; sessionData.referralNumber = order?.referralNumber;
sessionData.referralSequenceNumber = order?.referralSequenceNumber; sessionData.referralSequenceNumber = order?.referralSequenceNumber;

View file

@ -1838,6 +1838,56 @@ export const actions = {
return response; 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
if (response?.data?.glassPieceParts) {
response.data.glassPieceParts = convertGlassPieceNamingFromApi(
response.data.glassPieceParts
);
}
return response;
},
async getWipers(context, { payload, pageNameToLog }) { async getWipers(context, { payload, pageNameToLog }) {
const carId = payload.carId; const carId = payload.carId;
const serviceZipCode = payload.serviceZipCode; const serviceZipCode = payload.serviceZipCode;
@ -1938,26 +1988,6 @@ export const actions = {
return response; 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 }) { getServiceabilityDetails(context, { payload: { serviceZipCode }, pageNameToLog }) {
const escapeRecalibrationType = (rt) => rt.split("&").join("%26"); const escapeRecalibrationType = (rt) => rt.split("&").join("%26");

View file

@ -123,8 +123,8 @@ $body-color: $gray-600;
//Fonts //Fonts
$font-family-sans-serif: UrbanistRegular, Arial, Helvetica, sans-serif; $font-family-sans-serif: UrbanistRegular, Arial, Helvetica, sans-serif;
$font-family-monospace: $font-family-monospace: UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; monospace;
// stylelint-enable value-keyword-case // stylelint-enable value-keyword-case
$font-family-base: $font-family-sans-serif; $font-family-base: $font-family-sans-serif;
$font-family-code: $font-family-monospace; $font-family-code: $font-family-monospace;

View file

@ -15,7 +15,7 @@
<!-- prettier-ignore --> <!-- prettier-ignore -->
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{ text }}<slot name="after-text"></slot></a> <a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{ text }}<slot name="after-text"></slot></a>
<!-- prettier-ignore --> <!-- prettier-ignore -->
<a v-else-if="linkType === 'text'" @click="handleClick" :href="href">{{ text }}<slot name="after-text"></slot></a> <a v-else-if="linkType === 'text'" @click="handleClick" class="text-link" :href="href">{{ text }}<slot name="after-text"></slot></a>
</template> </template>
<script> <script>
@ -89,5 +89,8 @@ a {
&.new-window-link { &.new-window-link {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
&.text-link {
white-space: nowrap;
}
} }
</style> </style>