Merge branch 'release/2026.01.15' into nation/CASH-1952
This commit is contained in:
commit
f196fb3fa1
21 changed files with 214 additions and 69 deletions
|
|
@ -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' },
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ const GaCategories = {
|
|||
EVOX: "Evox",
|
||||
APPOINTMENT: "Appointment",
|
||||
SERVICE_LOCATION: "service-location",
|
||||
CONFIRMATION_CLICKED: "confirmation clicked",
|
||||
};
|
||||
|
||||
const GaActions = {
|
||||
|
|
@ -26,6 +27,8 @@ const GaActions = {
|
|||
MOBILE_AVAILABLE: "mobile_available",
|
||||
SHOPS_FIRST_DISPLAYED: "shops_first_displayed",
|
||||
MORE_LOCATIONS_CLICKED: "more_locations_clicked",
|
||||
YES: "yes",
|
||||
NO: "no",
|
||||
};
|
||||
|
||||
const GaLabels = {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -216,6 +212,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",
|
||||
},
|
||||
InitializeAdyenPayment: {
|
||||
url: "/payment/api/v1/payment/payment/session/initialize-session",
|
||||
method: "POST",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
USE_ADYEN_PAYMENT: "UseAdyenPayment",
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
@ -32,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",
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ export default {
|
|||
const response = config.getSelectableDatesCallback({
|
||||
startDateString: initialViewStartDate,
|
||||
endDateString: initialViewEndDate,
|
||||
providerNumber: config.providerNumber,
|
||||
inshopProviderNumber: config.inshopProviderNumber,
|
||||
zipCode: config.zipCode,
|
||||
includeMobileTimeSlots: config.includeMobileTimeSlots,
|
||||
includeInshopTimeSlots: config.includeInshopTimeSlots,
|
||||
|
|
|
|||
|
|
@ -160,6 +160,10 @@ export default {
|
|||
return this.staticBackdrop ? "static" : "true";
|
||||
},
|
||||
},
|
||||
unmounted() {
|
||||
// remove any modal effects before leaving page (e.g. user hits browser back button)
|
||||
this.closeModal();
|
||||
},
|
||||
components: {
|
||||
modalButtonMain,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@ export default {
|
|||
modalWidgetName: String,
|
||||
pageName: String,
|
||||
},
|
||||
unmounted() {
|
||||
// remove any modal effects before leaving page (e.g. user hits browser back button)
|
||||
this.modal?.closeModal();
|
||||
},
|
||||
computed: {
|
||||
buttonText() {
|
||||
return this.getCmsContent(this.modalWidgetName, "SubheaderText");
|
||||
|
|
|
|||
|
|
@ -54,10 +54,6 @@ export default {
|
|||
mounted() {
|
||||
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
|
||||
props: {
|
||||
modelValue: Object,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@
|
|||
cmsWidgetName="PleaseProvideAddressWidget"
|
||||
class="provide-address-header" />
|
||||
<textBlock
|
||||
v-if="isMSRFeeApplicable()"
|
||||
cmsWidgetName="VehicleKeysMSRMessageWidget"
|
||||
class="keys-message" />
|
||||
<textBlock
|
||||
v-else
|
||||
cmsWidgetName="VehicleKeysMessageWidget"
|
||||
class="keys-message" />
|
||||
<mobileAddressQuestions
|
||||
|
|
@ -143,6 +148,9 @@ export default {
|
|||
getIsVehicleProtectedFromStore() {
|
||||
return store.getters.order.serviceLocation.isVehicleProtected;
|
||||
},
|
||||
isMSRFeeApplicable() {
|
||||
return store.getters.order.isMSRFeeApplicable;
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
await this.dispatchStoreAction(
|
||||
this.storeActions.SAVE_MOBILE_DETAILS,
|
||||
|
|
|
|||
|
|
@ -253,9 +253,10 @@ export default {
|
|||
height: 40px;
|
||||
}
|
||||
h3 {
|
||||
font-family: UrbanistSemibold;
|
||||
font-family: UrbanistBold;
|
||||
font-size: 1rem;
|
||||
margin: 0 0 0 0.5rem;
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
p {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
@vapsItemsSelected="vapsItemsSelectedAction"
|
||||
@quotePageDiscountSelected="quotePageDiscountSelectedAction"
|
||||
@currentNumberOfPackages="currentNumberOfPackagesAction"
|
||||
@servicePackageSelected="servicePackageSelectedAction"
|
||||
:servicePackage="servicePackage"
|
||||
:activePromos="lineItems.promos"
|
||||
:availableQuotePageDiscounts="quoteDiscountPartsInfo"
|
||||
|
|
@ -218,6 +219,19 @@ export default {
|
|||
"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 skipQuoteExperiment = store.getters.applicationUser.experiments.find(
|
||||
(e) => e.universeName === experimentUniverses.IGQ_SkipQuote
|
||||
|
|
@ -564,6 +578,7 @@ export default {
|
|||
isSaveProgressComplete: null,
|
||||
packageNumber: null,
|
||||
skipToInsurance: null,
|
||||
servicePackageSelected: null,
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
|
|
@ -670,6 +685,9 @@ export default {
|
|||
vapsItemsSelectedAction(vapsItemsSelected) {
|
||||
this.lineItems.vaps = vapsItemsSelected;
|
||||
},
|
||||
servicePackageSelectedAction(newValue) {
|
||||
this.servicePackageSelected = newValue;
|
||||
},
|
||||
quotePageDiscountSelectedAction(supportingItemsSelected) {
|
||||
this.lineItems.supportingItems = supportingItemsSelected;
|
||||
},
|
||||
|
|
@ -758,7 +776,14 @@ 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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
isModalOpen: false,
|
||||
selectedAppontment: {
|
||||
selectedAppointment: {
|
||||
estimatedServiceMinutes: {
|
||||
minimum: null,
|
||||
maximum: null,
|
||||
|
|
@ -58,6 +58,7 @@ export default {
|
|||
timeSlot: null,
|
||||
date: null,
|
||||
},
|
||||
confirmedAppointment: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -67,22 +68,25 @@ export default {
|
|||
this.modal.openModal();
|
||||
},
|
||||
onModalClosed() {
|
||||
this.pushEvent();
|
||||
this.$emit("close-mobile-first-modal");
|
||||
this.confirmedAppointment = false;
|
||||
},
|
||||
closeModal() {
|
||||
this.modal.closeModal();
|
||||
},
|
||||
confirmAppointment() {
|
||||
let selectedTimeSlot = {
|
||||
timeSlot: this.selectedAppontment.timeSlot,
|
||||
routeCode: this.selectedAppontment.timeSlot.id,
|
||||
date: this.selectedAppontment.date,
|
||||
timeSlot: this.selectedAppointment.timeSlot,
|
||||
routeCode: this.selectedAppointment.timeSlot.id,
|
||||
date: this.selectedAppointment.date,
|
||||
};
|
||||
this.confirmedAppointment = true;
|
||||
this.$emit("confirm-appointment", selectedTimeSlot);
|
||||
this.modal.closeModal();
|
||||
},
|
||||
setSelectedAppointment(appointment) {
|
||||
this.selectedAppontment = appointment;
|
||||
this.selectedAppointment = appointment;
|
||||
},
|
||||
getIsModalOpen() {
|
||||
return this.isModalOpen;
|
||||
|
|
@ -90,6 +94,21 @@ export default {
|
|||
setIsModalOpen(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: {
|
||||
modalName() {
|
||||
|
|
@ -112,37 +131,37 @@ export default {
|
|||
if (token.includes(INLINE_SERVICETYPE_TOKEN)) {
|
||||
const serviceType = "<strong>" + this.getServiceType + "</strong>";
|
||||
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 =
|
||||
"<strong>" +
|
||||
new Date(this.selectedAppontment.date).toLocaleDateString("en-US", {
|
||||
new Date(this.selectedAppointment.date).toLocaleDateString("en-US", {
|
||||
weekday: "long",
|
||||
timeZone: "UTC",
|
||||
}) +
|
||||
"</strong>";
|
||||
tokens.splice(tokens.indexOf(token), 1, day);
|
||||
} else if (token.includes(INLINE_DATE_TOKEN) && this.selectedAppontment.date) {
|
||||
const date = new Date(this.selectedAppontment.date).toLocaleDateString(
|
||||
} else if (token.includes(INLINE_DATE_TOKEN) && this.selectedAppointment.date) {
|
||||
const date = new Date(this.selectedAppointment.date).toLocaleDateString(
|
||||
"en-US",
|
||||
{ timeZone: "UTC", weekday: "long", month: "long", day: "numeric" }
|
||||
);
|
||||
tokens.splice(tokens.indexOf(token), 1, date);
|
||||
} else if (
|
||||
token.includes(INLINE_TIMESLOT_TOKEN) &&
|
||||
this.selectedAppontment.timeSlot
|
||||
this.selectedAppointment.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);
|
||||
} else if (
|
||||
token.includes(INLINE_SERVICE_LENGTH_TOKEN) &&
|
||||
this.selectedAppontment.estimatedServiceMinutes
|
||||
this.selectedAppointment.estimatedServiceMinutes
|
||||
) {
|
||||
const inshopDurationTime = getDisplayTextForDurationLength(
|
||||
this.selectedAppontment.estimatedServiceMinutes.minimum,
|
||||
this.selectedAppontment.estimatedServiceMinutes.maximum
|
||||
this.selectedAppointment.estimatedServiceMinutes.minimum,
|
||||
this.selectedAppointment.estimatedServiceMinutes.maximum
|
||||
);
|
||||
tokens.splice(tokens.indexOf(token), 1, inshopDurationTime);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@ const getScheduleApiResponse = async ({
|
|||
startDateString,
|
||||
endDateString,
|
||||
providerNumber,
|
||||
inshopProviderNumber,
|
||||
zipCode,
|
||||
includeMobileTimeSlots = true,
|
||||
includeInshopTimeSlots = true,
|
||||
|
|
@ -328,7 +329,7 @@ const getScheduleApiResponse = async ({
|
|||
startDate: apiStartDate,
|
||||
endDate: apiEndDate,
|
||||
shopAppointmentType: "InshopOrDropoff",
|
||||
providerNumber: providerNumber,
|
||||
providerNumber: inshopProviderNumber,
|
||||
},
|
||||
};
|
||||
if (apiStartDate < apiEndDate) {
|
||||
|
|
@ -632,6 +633,9 @@ export default {
|
|||
return this.isGlassServiceableMobile;
|
||||
}
|
||||
},
|
||||
closestInshopProviderNumber() {
|
||||
return this.shopProviderData?.shopProviders[0]?.providerNumber;
|
||||
},
|
||||
showTimeSlotQuestion() {
|
||||
if (
|
||||
this.selectedDate &&
|
||||
|
|
@ -1166,6 +1170,9 @@ export default {
|
|||
startDateString: startDate,
|
||||
endDateString: endDate,
|
||||
providerNumber: this.selectedProvider?.providerNumber,
|
||||
inshopProviderNumber: this.isMobileSelected
|
||||
? this.closestInshopProviderNumber
|
||||
: this.selectedProvider?.providerNumber,
|
||||
zipCode: this.zipCode,
|
||||
includeMobileTimeSlots: this.isServiceableMobile,
|
||||
includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff,
|
||||
|
|
@ -1194,6 +1201,9 @@ export default {
|
|||
getSelectableDatesCallback: getScheduleApiResponse,
|
||||
preSelectedDate: this.preSelectedDate,
|
||||
providerNumber: this.selectedProvider?.providerNumber,
|
||||
inshopProviderNumber: this.isMobileSelected
|
||||
? this.closestInshopProviderNumber
|
||||
: this.selectedProvider?.providerNumber,
|
||||
zipCode: this.zipCode,
|
||||
includeMobileTimeSlots: includeMobileTimeSlots,
|
||||
includeInshopTimeSlots: includeInshopTimeSlots,
|
||||
|
|
@ -1655,6 +1665,8 @@ export default {
|
|||
this.updateSelectedProvider();
|
||||
},
|
||||
updateSelectedProvider(newShopProvider) {
|
||||
if (!this.appointmentTypeStrings) return;
|
||||
|
||||
if (newShopProvider) {
|
||||
this.selectedProvider = newShopProvider;
|
||||
} else if (this.appointmentType === this.appointmentTypeStrings.MOBILE) {
|
||||
|
|
@ -1731,7 +1743,11 @@ 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.updateSelectedProvider();
|
||||
}
|
||||
} else {
|
||||
this.appointmentType = null;
|
||||
}
|
||||
|
|
@ -1798,23 +1814,34 @@ 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
|
||||
) {
|
||||
// Selects the first available AM time slot. If none, selects the first available PM time slot
|
||||
preSelectedMobileAppointment = firstMobileAMAppt
|
||||
? firstMobileAMAppt
|
||||
: null;
|
||||
!preSelectedMobileAppointment &&
|
||||
(preSelectedMobileAppointment = firstMobilePMAppt);
|
||||
: firstMobilePMAppt;
|
||||
}
|
||||
|
||||
this.$refs.mobileFirstModal.setSelectedAppointment(
|
||||
preSelectedMobileAppointment
|
||||
);
|
||||
this.$refs.mobileFirstModal.openModal();
|
||||
if (preSelectedMobileAppointment) {
|
||||
this.$refs.mobileFirstModal.setSelectedAppointment(
|
||||
preSelectedMobileAppointment
|
||||
);
|
||||
this.$refs.mobileFirstModal.openModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -548,9 +548,6 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
unmounted() {
|
||||
if (this.isModalOpened) this.closeModal();
|
||||
},
|
||||
watch: {
|
||||
waitListRequested(newVal) {
|
||||
if (newVal) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1838,6 +1838,56 @@ 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
|
||||
if (response?.data?.glassPieceParts) {
|
||||
response.data.glassPieceParts = convertGlassPieceNamingFromApi(
|
||||
response.data.glassPieceParts
|
||||
);
|
||||
}
|
||||
|
||||
return response;
|
||||
},
|
||||
|
||||
async getWipers(context, { payload, pageNameToLog }) {
|
||||
const carId = payload.carId;
|
||||
const serviceZipCode = payload.serviceZipCode;
|
||||
|
|
@ -1938,26 +1988,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");
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ $body-color: $gray-600;
|
|||
|
||||
//Fonts
|
||||
$font-family-sans-serif: UrbanistRegular, Arial, Helvetica, sans-serif;
|
||||
$font-family-monospace:
|
||||
UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
$font-family-monospace: UrbanistRegular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
|
||||
monospace;
|
||||
// stylelint-enable value-keyword-case
|
||||
$font-family-base: $font-family-sans-serif;
|
||||
$font-family-code: $font-family-monospace;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<!-- prettier-ignore -->
|
||||
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{ text }}<slot name="after-text"></slot></a>
|
||||
<!-- 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>
|
||||
|
||||
<script>
|
||||
|
|
@ -89,5 +89,8 @@ a {
|
|||
&.new-window-link {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
&.text-link {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue