Merge remote-tracking branch 'origin/feature/CASH-1077' into feature/CASH-1077

This commit is contained in:
Johnny shultz 2025-07-10 15:18:26 -04:00
commit f604f3c961
3 changed files with 22 additions and 16 deletions

View file

@ -482,11 +482,12 @@ export default {
}
const loadInitialDataPromise = new Promise((resolve, reject) => {
const response = config.getSelectableDatesCallback(
initialViewStartDate,
initialViewEndDate,
config.providerNumber
);
const response = config.getSelectableDatesCallback({
startDateString: initialViewStartDate,
endDateString: initialViewEndDate,
providerNumber: config.providerNumber,
zipCode: config.zipCode,
});
resolve(response);
});

View file

@ -257,7 +257,12 @@ const TIME_SLOTS_CALL_DAYS_LIMIT = 34; // needs to be 34 for API limits (35 does
const NUMBER_OF_CALENDAR_ROWS_TO_SHOW_FOR_INITIAL_VIEW = 2;
const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
const getScheduleApiResponse = async (startDateString, endDateString, providerNumber) => {
const getScheduleApiResponse = async ({
startDateString,
endDateString,
providerNumber,
zipCode,
}) => {
const apiEndDateLimit = sumDateString(startDateString, TIME_SLOTS_CALL_DAYS_LIMIT);
const difference = calcDaysBetweenDates(startDateString, endDateString);
const apiCallsCount = Math.ceil(difference / TIME_SLOTS_CALL_DAYS_LIMIT);
@ -287,6 +292,7 @@ const getScheduleApiResponse = async (startDateString, endDateString, providerNu
payload: {
startDate: apiStartDate,
endDate: apiEndDate,
zipCode: zipCode,
},
};
storeActionConfigInshop = {
@ -762,9 +768,7 @@ export default {
);
},
isAppointmentTypeDisplayed() {
// temporary adjustment
return true;
// return this.zipCode && !this.displayNoShopsAlert;
return this.zipCode && !this.displayNoShopsAlert;
},
requiresInshopRecalibration() {
// Specifically check for isRecalibrationServiceableMobile === false, not null or true.
@ -1207,11 +1211,12 @@ export default {
},
async getMoreScheduleData(startDate, endDate) {
// called only when "View more dates" is clicked; not on initial page load
const moreShopTimeSlots = await getScheduleApiResponse(
startDate,
endDate,
this.selectedProvider.providerNumber
);
const moreShopTimeSlots = await getScheduleApiResponse({
startDateString: startDate,
endDateString: endDate,
providerNumber: this.selectedProvider.providerNumber,
zipCode: this.zipCode,
});
// ADD API CALL RESULTS TO EXISTING DATE DATA
this.selectableDatesInshop.days = this.selectableDatesInshop.days.concat(

View file

@ -2101,7 +2101,7 @@ export const actions = {
return globalMethods.callHttpClient(options);
},
getMobileTimeSlots(context, { payload: { startDate, endDate }, pageNameToLog }) {
getMobileTimeSlots(context, { payload: { startDate, endDate, zipCode }, pageNameToLog }) {
const order = context.state.order;
const vehicle = context.state.order.vehicle;
const payment = context.state.order.payment;
@ -2139,7 +2139,7 @@ export const actions = {
style: vehicle.style,
vin: vehicle.vin ?? "",
},
zipCode: order.serviceLocation.zipCode,
zipCode: zipCode ?? order.serviceLocation.zipCode,
};
let hasCalled = timeSlotCallFlags.mobile;