CASH-1712 - restrict showAnotherMonth logic to be more specific to avoid loading next month if only one appointment type is available
This commit is contained in:
parent
36b8ed0ac1
commit
4405c1c3f0
1 changed files with 6 additions and 4 deletions
|
|
@ -1217,6 +1217,8 @@ export default {
|
||||||
async initializeDatePicker() {
|
async initializeDatePicker() {
|
||||||
this.selectedDate = null;
|
this.selectedDate = null;
|
||||||
|
|
||||||
|
const includeMobileTimeSlots = this.isServiceableMobile;
|
||||||
|
const includeInshopTimeSlots = this.isServiceableInshop || this.isServiceableDropoff;
|
||||||
const datePickerInitialData = await this.$refs.datePicker.loadInitialData({
|
const datePickerInitialData = await this.$refs.datePicker.loadInitialData({
|
||||||
// setup config options for date-picker
|
// setup config options for date-picker
|
||||||
selectableDatesSetting: "custom",
|
selectableDatesSetting: "custom",
|
||||||
|
|
@ -1225,8 +1227,8 @@ export default {
|
||||||
preSelectedDate: this.preSelectedDate,
|
preSelectedDate: this.preSelectedDate,
|
||||||
providerNumber: this.selectedProvider?.providerNumber,
|
providerNumber: this.selectedProvider?.providerNumber,
|
||||||
zipCode: this.zipCode,
|
zipCode: this.zipCode,
|
||||||
includeMobileTimeSlots: this.isServiceableMobile,
|
includeMobileTimeSlots: includeMobileTimeSlots,
|
||||||
includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff,
|
includeInshopTimeSlots: includeInshopTimeSlots,
|
||||||
});
|
});
|
||||||
datePickerInitialData.pricingByDayBasePrice = this.pricingByDayBasePrice;
|
datePickerInitialData.pricingByDayBasePrice = this.pricingByDayBasePrice;
|
||||||
datePickerInitialData.pricingByDayUpcharge = this.pricingByDayUpcharge;
|
datePickerInitialData.pricingByDayUpcharge = this.pricingByDayUpcharge;
|
||||||
|
|
@ -1242,8 +1244,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
// if no date is preselected on load, make sure there are some dates available
|
// if no date is preselected on load, make sure there are some dates available
|
||||||
if (
|
if (
|
||||||
this.selectableDatesInshop.days.length < 1 ||
|
(includeInshopTimeSlots && this.selectableDatesInshop.days.length < 1) ||
|
||||||
this.selectableDatesMobile.days.length < 1
|
(includeMobileTimeSlots && this.selectableDatesMobile.days.length < 1)
|
||||||
) {
|
) {
|
||||||
await this.$nextTick();
|
await this.$nextTick();
|
||||||
await this.$refs.datePicker.showAnotherMonth();
|
await this.$refs.datePicker.showAnotherMonth();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue