CASH-565: Update selectable dates for waitlist

This commit is contained in:
Chris Redelinghuys 2025-04-30 08:40:39 -04:00
parent 1a773c680c
commit 4bc064e83b
2 changed files with 8 additions and 2 deletions

View file

@ -714,7 +714,7 @@ export default {
} }
if (monthToShow) { if (monthToShow) {
// make new API call with this month's start and end dates // 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[monthStartDateNum].inputValue,
monthToShow.dates[monthToShow.dates.length - 1].inputValue monthToShow.dates[monthToShow.dates.length - 1].inputValue
); );
@ -725,6 +725,8 @@ export default {
if (monthToShow.monthClass.includes("last-available-month")) if (monthToShow.monthClass.includes("last-available-month"))
this.disableViewMoreDatesButton = true; this.disableViewMoreDatesButton = true;
return moreSelectableDatesData;
} }
}, },
async updateSelectableDates(monthStart, monthEnd) { async updateSelectableDates(monthStart, monthEnd) {
@ -749,6 +751,7 @@ export default {
}); });
}); });
}); });
return moreSelectableDates;
}, },
scrollToElement(elementId, duration = 800, easing = "ease-in-out") { scrollToElement(elementId, duration = 800, easing = "ease-in-out") {
const wrapper = document.querySelector(".page-container-grouped-styles"); const wrapper = document.querySelector(".page-container-grouped-styles");

View file

@ -373,7 +373,10 @@ export default {
this.selectedDate = selectableDatesData.days[0].date; this.selectedDate = selectableDatesData.days[0].date;
} else { } else {
setTimeout(() => { setTimeout(() => {
this.$refs.datePicker.showAnotherMonth(); this.$refs.datePicker.showAnotherMonth().then((moreSelectableDatesData) => {
this.selectableDatesData = moreSelectableDatesData;
this.setDisplayWaitList();
});
}, 50); }, 50);
} }
} }