CASH-1790 updates for schedule page

This commit is contained in:
Adam Caouette 2026-01-26 10:06:44 -05:00
parent 7eed110bd2
commit c4257e2eae

View file

@ -40,6 +40,13 @@
cmsWidgetName="AppointmentTypeQuestionWidget" cmsWidgetName="AppointmentTypeQuestionWidget"
validationRules="option-required" validationRules="option-required"
labelBold="true" /> labelBold="true" />
<loader
v-if="
isServiceableMobile && isServiceableInshop && !hasSelectableDatesLoaded
"
class="appointment-type-loader"
loaderColor="blue"
loaderPosition="center" />
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -154,7 +161,8 @@
:pricingByDayBasePrice="pricingByDayBasePrice" :pricingByDayBasePrice="pricingByDayBasePrice"
:pricingByDayUpcharge="pricingByDayUpcharge" :pricingByDayUpcharge="pricingByDayUpcharge"
:showPricingByDay="showPricingByDay" :showPricingByDay="showPricingByDay"
:isPricingByDayExperiment="isPricingByDayExperiment" /> :isPricingByDayExperiment="isPricingByDayExperiment"
:loadingStatus="calendarLoadingStatus" />
<timeSlotQuestion <timeSlotQuestion
ref="timeSlotModalQuestion" ref="timeSlotModalQuestion"
v-if="showTimeSlotQuestion" v-if="showTimeSlotQuestion"
@ -173,7 +181,8 @@
:timeSlotsForSelectedDate="timeSlotsForSelectedDate" :timeSlotsForSelectedDate="timeSlotsForSelectedDate"
:isSameDay="isSameDay" :isSameDay="isSameDay"
:selectedRouteCodeData="selectedRouteCodeData" :selectedRouteCodeData="selectedRouteCodeData"
@waitListRequested="handleWaitListRequested" /> @waitListRequested="handleWaitListRequested"
lazyLoadAmountToLoad="10" />
<navbar <navbar
cmsWidgetName="FunnelFooterWidget" cmsWidgetName="FunnelFooterWidget"
ref="navbar" ref="navbar"
@ -215,6 +224,7 @@ import textBlock from "@/digital-components/text-block/text-block";
import mobileFeeWaiverAlert from "./mobile-fee-waiver-alert/mobile-fee-waiver-alert.vue"; import mobileFeeWaiverAlert from "./mobile-fee-waiver-alert/mobile-fee-waiver-alert.vue";
// Supporting files // Supporting files
import loader from "@/ux-components/loader/loader";
import baseMixin from "@/mixins/base-mixin.js"; import baseMixin from "@/mixins/base-mixin.js";
import experimentMixin from "@/mixins/experiment-mixin.js"; import experimentMixin from "@/mixins/experiment-mixin.js";
import { experimentUniverses, experimentSettings } from "@/constants/experiments"; import { experimentUniverses, experimentSettings } from "@/constants/experiments";
@ -485,6 +495,7 @@ export default {
experimentSettings.SHOW_MOBILE_FIRST_APPT, experimentSettings.SHOW_MOBILE_FIRST_APPT,
"true" "true"
), ),
calendarLoadingStatus: "none",
}; };
}, },
async beforeRouteEnter(to, from, next) { async beforeRouteEnter(to, from, next) {
@ -595,6 +606,8 @@ export default {
// Call the "next" function to complete the transition to this page. // Call the "next" function to complete the transition to this page.
next((vm) => { next((vm) => {
vm.showLoadingModal();
vm.calendarLoadingStatus = "initial";
vm.setCmsContent(resultMap.cmsContent); vm.setCmsContent(resultMap.cmsContent);
vm.$refs.locationAlerts.initializeComponent(resultMap.alertReasons); vm.$refs.locationAlerts.initializeComponent(resultMap.alertReasons);
vm.mobilePremiumAppointmentFee = pricedPremiumFee; vm.mobilePremiumAppointmentFee = pricedPremiumFee;
@ -615,6 +628,8 @@ export default {
); );
vm.initializeDatePicker().then(() => { vm.initializeDatePicker().then(() => {
vm.showMobileFirstModal(); vm.showMobileFirstModal();
vm.calendarLoadingStatus = "none";
vm.hideLoadingModal();
}); });
}); });
}, },
@ -1147,9 +1162,11 @@ export default {
); );
} }
}, },
async onShopSelected(shopQuestionPopUpData) { onShopSelected(shopQuestionPopUpData) {
this.resetWaitlist(); this.resetWaitlist();
this.preSelectedDate = null; this.preSelectedDate = null;
this.calendarLoadingStatus = "reinitial";
this.$refs.datePicker.isLoading = true;
this.shopProviderData = shopQuestionPopUpData.shopProviderData; this.shopProviderData = shopQuestionPopUpData.shopProviderData;
const oldProvider = this.selectedProvider; const oldProvider = this.selectedProvider;
const selectedProvider = this.shopProviderData.shopProviders.find((shopProvider) => { const selectedProvider = this.shopProviderData.shopProviders.find((shopProvider) => {
@ -1169,11 +1186,16 @@ export default {
this.updateSelectedProvider(selectedProvider); this.updateSelectedProvider(selectedProvider);
} }
} }
await this.initializeDatePicker(); this.initializeDatePicker().then(() => {
this.setSelectedDateToFirstAvailable(); this.showMobileFirstModal();
this.calendarLoadingStatus = "none";
this.$refs.datePicker.isLoading = false;
this.setSelectedDateToFirstAvailable();
});
}, },
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
this.calendarLoadingStatus = "more";
const moreShopTimeSlots = await getScheduleApiResponse({ const moreShopTimeSlots = await getScheduleApiResponse({
startDateString: startDate, startDateString: startDate,
endDateString: endDate, endDateString: endDate,
@ -1185,6 +1207,7 @@ export default {
includeMobileTimeSlots: this.isServiceableMobile, includeMobileTimeSlots: this.isServiceableMobile,
includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff, includeInshopTimeSlots: this.isServiceableInshop || this.isServiceableDropoff,
}); });
this.calendarLoadingStatus = "none";
// 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(
@ -1241,7 +1264,7 @@ export default {
} }
} }
this.isShowMobileFirstAppt && this.hideLoadingModal(); this.isShowMobileFirstAppt;
}, },
getIsRecalAcknowledgedForSchedulingFromStore() { getIsRecalAcknowledgedForSchedulingFromStore() {
return store.getters.order.isRecalAcknowledgedForScheduling; return store.getters.order.isRecalAcknowledgedForScheduling;
@ -1749,6 +1772,7 @@ export default {
} }
this.resetMobileLocation(); this.resetMobileLocation();
this.calendarLoadingStatus = "initial";
getShopProviderData(newZipCode.zipCode, this.pageName).then((result) => { getShopProviderData(newZipCode.zipCode, this.pageName).then((result) => {
this.shopProviderData = result.data; this.shopProviderData = result.data;
@ -1759,6 +1783,7 @@ export default {
this.selectedDate = null; this.selectedDate = null;
this.initializeDatePicker().then(() => { this.initializeDatePicker().then(() => {
this.showMobileFirstModal(); this.showMobileFirstModal();
this.calendarLoadingStatus = "none";
}); });
}); });
}, },
@ -2030,6 +2055,7 @@ export default {
durationTextBlock, durationTextBlock,
shopLocation, shopLocation,
mobileFeeWaiverAlert, mobileFeeWaiverAlert,
loader,
}, },
}; };
</script> </script>
@ -2048,6 +2074,14 @@ export default {
&.hidden-background { &.hidden-background {
display: none; display: none;
} }
.appointment-type-loader {
margin-top: 1.5rem;
width: calc(100% - 2rem);
&.loader:after {
width: 2rem;
height: 2rem;
}
}
} }
.alert.alert-warning { .alert.alert-warning {
.alert-heading { .alert-heading {