Merge remote-tracking branch 'origin/feature/CASH-1077' into feature/CASH-1077
This commit is contained in:
commit
f604f3c961
3 changed files with 22 additions and 16 deletions
|
|
@ -482,11 +482,12 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadInitialDataPromise = new Promise((resolve, reject) => {
|
const loadInitialDataPromise = new Promise((resolve, reject) => {
|
||||||
const response = config.getSelectableDatesCallback(
|
const response = config.getSelectableDatesCallback({
|
||||||
initialViewStartDate,
|
startDateString: initialViewStartDate,
|
||||||
initialViewEndDate,
|
endDateString: initialViewEndDate,
|
||||||
config.providerNumber
|
providerNumber: config.providerNumber,
|
||||||
);
|
zipCode: config.zipCode,
|
||||||
|
});
|
||||||
resolve(response);
|
resolve(response);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 NUMBER_OF_CALENDAR_ROWS_TO_SHOW_FOR_INITIAL_VIEW = 2;
|
||||||
const MOBILE_FEE_PART_TYPE = "MOBILE FEE";
|
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 apiEndDateLimit = sumDateString(startDateString, TIME_SLOTS_CALL_DAYS_LIMIT);
|
||||||
const difference = calcDaysBetweenDates(startDateString, endDateString);
|
const difference = calcDaysBetweenDates(startDateString, endDateString);
|
||||||
const apiCallsCount = Math.ceil(difference / TIME_SLOTS_CALL_DAYS_LIMIT);
|
const apiCallsCount = Math.ceil(difference / TIME_SLOTS_CALL_DAYS_LIMIT);
|
||||||
|
|
@ -287,6 +292,7 @@ const getScheduleApiResponse = async (startDateString, endDateString, providerNu
|
||||||
payload: {
|
payload: {
|
||||||
startDate: apiStartDate,
|
startDate: apiStartDate,
|
||||||
endDate: apiEndDate,
|
endDate: apiEndDate,
|
||||||
|
zipCode: zipCode,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
storeActionConfigInshop = {
|
storeActionConfigInshop = {
|
||||||
|
|
@ -762,9 +768,7 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
isAppointmentTypeDisplayed() {
|
isAppointmentTypeDisplayed() {
|
||||||
// temporary adjustment
|
return this.zipCode && !this.displayNoShopsAlert;
|
||||||
return true;
|
|
||||||
// return this.zipCode && !this.displayNoShopsAlert;
|
|
||||||
},
|
},
|
||||||
requiresInshopRecalibration() {
|
requiresInshopRecalibration() {
|
||||||
// Specifically check for isRecalibrationServiceableMobile === false, not null or true.
|
// Specifically check for isRecalibrationServiceableMobile === false, not null or true.
|
||||||
|
|
@ -1207,11 +1211,12 @@ export default {
|
||||||
},
|
},
|
||||||
async getMoreScheduleData(startDate, endDate) {
|
async getMoreScheduleData(startDate, endDate) {
|
||||||
// called only when "View more dates" is clicked; not on initial page load
|
// called only when "View more dates" is clicked; not on initial page load
|
||||||
const moreShopTimeSlots = await getScheduleApiResponse(
|
const moreShopTimeSlots = await getScheduleApiResponse({
|
||||||
startDate,
|
startDateString: startDate,
|
||||||
endDate,
|
endDateString: endDate,
|
||||||
this.selectedProvider.providerNumber
|
providerNumber: this.selectedProvider.providerNumber,
|
||||||
);
|
zipCode: this.zipCode,
|
||||||
|
});
|
||||||
|
|
||||||
// ADD API CALL RESULTS TO EXISTING DATE DATA
|
// ADD API CALL RESULTS TO EXISTING DATE DATA
|
||||||
this.selectableDatesInshop.days = this.selectableDatesInshop.days.concat(
|
this.selectableDatesInshop.days = this.selectableDatesInshop.days.concat(
|
||||||
|
|
|
||||||
|
|
@ -2101,7 +2101,7 @@ export const actions = {
|
||||||
return globalMethods.callHttpClient(options);
|
return globalMethods.callHttpClient(options);
|
||||||
},
|
},
|
||||||
|
|
||||||
getMobileTimeSlots(context, { payload: { startDate, endDate }, pageNameToLog }) {
|
getMobileTimeSlots(context, { payload: { startDate, endDate, zipCode }, pageNameToLog }) {
|
||||||
const order = context.state.order;
|
const order = context.state.order;
|
||||||
const vehicle = context.state.order.vehicle;
|
const vehicle = context.state.order.vehicle;
|
||||||
const payment = context.state.order.payment;
|
const payment = context.state.order.payment;
|
||||||
|
|
@ -2139,7 +2139,7 @@ export const actions = {
|
||||||
style: vehicle.style,
|
style: vehicle.style,
|
||||||
vin: vehicle.vin ?? "",
|
vin: vehicle.vin ?? "",
|
||||||
},
|
},
|
||||||
zipCode: order.serviceLocation.zipCode,
|
zipCode: zipCode ?? order.serviceLocation.zipCode,
|
||||||
};
|
};
|
||||||
|
|
||||||
let hasCalled = timeSlotCallFlags.mobile;
|
let hasCalled = timeSlotCallFlags.mobile;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue