CASH-845 prettier fixes
This commit is contained in:
parent
03b588bcd9
commit
26035ab37d
2 changed files with 18 additions and 17 deletions
|
|
@ -482,14 +482,12 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadInitialDataPromise = new Promise((resolve, reject) => {
|
const loadInitialDataPromise = new Promise((resolve, reject) => {
|
||||||
const response = config.getSelectableDatesCallback(
|
const response = config.getSelectableDatesCallback({
|
||||||
{
|
startDateString: initialViewStartDate,
|
||||||
startDateString: initialViewStartDate,
|
endDateString: initialViewEndDate,
|
||||||
endDateString: initialViewEndDate,
|
providerNumber: config.providerNumber,
|
||||||
providerNumber: config.providerNumber,
|
zipCode: config.zipCode,
|
||||||
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, zipCode}) => {
|
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);
|
||||||
|
|
@ -1205,14 +1210,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({
|
||||||
{
|
startDateString: startDate,
|
||||||
startDateString: startDate,
|
endDateString: endDate,
|
||||||
endDateString: endDate,
|
providerNumber: this.selectedProvider.providerNumber,
|
||||||
providerNumber: this.selectedProvider.providerNumber,
|
zipCode: this.zipCode,
|
||||||
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(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue