Merge pull request #2467 from Safelite/feature/CASH-565
CASH-565: Update selectable dates for waitlist
This commit is contained in:
commit
dc385f4424
2 changed files with 8 additions and 2 deletions
|
|
@ -714,7 +714,7 @@ export default {
|
|||
}
|
||||
if (monthToShow) {
|
||||
// make new API call with this month's start and end dates
|
||||
await this.updateSelectableDates(
|
||||
const moreSelectableDatesData = await this.updateSelectableDates(
|
||||
monthToShow.dates[monthStartDateNum].inputValue,
|
||||
monthToShow.dates[monthToShow.dates.length - 1].inputValue
|
||||
);
|
||||
|
|
@ -725,6 +725,8 @@ export default {
|
|||
|
||||
if (monthToShow.monthClass.includes("last-available-month"))
|
||||
this.disableViewMoreDatesButton = true;
|
||||
|
||||
return moreSelectableDatesData;
|
||||
}
|
||||
},
|
||||
async updateSelectableDates(monthStart, monthEnd) {
|
||||
|
|
@ -749,6 +751,7 @@ export default {
|
|||
});
|
||||
});
|
||||
});
|
||||
return moreSelectableDates;
|
||||
},
|
||||
scrollToElement(elementId, duration = 800, easing = "ease-in-out") {
|
||||
const wrapper = document.querySelector(".page-container-grouped-styles");
|
||||
|
|
|
|||
|
|
@ -373,7 +373,10 @@ export default {
|
|||
this.selectedDate = selectableDatesData.days[0].date;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.$refs.datePicker.showAnotherMonth();
|
||||
this.$refs.datePicker.showAnotherMonth().then((moreSelectableDatesData) => {
|
||||
this.selectableDatesData = moreSelectableDatesData;
|
||||
this.setDisplayWaitList();
|
||||
});
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue