From 4405c1c3f0323ca01ef0c76c13ee221c0ebc6287 Mon Sep 17 00:00:00 2001 From: AdamCaouetteSafelite Date: Fri, 24 Oct 2025 16:18:11 -0400 Subject: [PATCH] CASH-1712 - restrict showAnotherMonth logic to be more specific to avoid loading next month if only one appointment type is available --- src/layouts/schedule/schedule.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 81d4315b6..c5c697d35 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1217,6 +1217,8 @@ export default { async initializeDatePicker() { this.selectedDate = null; + const includeMobileTimeSlots = this.isServiceableMobile; + const includeInshopTimeSlots = this.isServiceableInshop || this.isServiceableDropoff; const datePickerInitialData = await this.$refs.datePicker.loadInitialData({ // setup config options for date-picker selectableDatesSetting: "custom", @@ -1225,8 +1227,8 @@ export default { preSelectedDate: this.preSelectedDate, providerNumber: this.selectedProvider?.providerNumber, zipCode: this.zipCode, - includeMobileTimeSlots: this.isServiceableMobile, - includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff, + includeMobileTimeSlots: includeMobileTimeSlots, + includeInshopTimeSlots: includeInshopTimeSlots, }); datePickerInitialData.pricingByDayBasePrice = this.pricingByDayBasePrice; datePickerInitialData.pricingByDayUpcharge = this.pricingByDayUpcharge; @@ -1242,8 +1244,8 @@ export default { } else { // if no date is preselected on load, make sure there are some dates available if ( - this.selectableDatesInshop.days.length < 1 || - this.selectableDatesMobile.days.length < 1 + (includeInshopTimeSlots && this.selectableDatesInshop.days.length < 1) || + (includeMobileTimeSlots && this.selectableDatesMobile.days.length < 1) ) { await this.$nextTick(); await this.$refs.datePicker.showAnotherMonth();