diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 72bdcb093..5f508f5be 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -140,9 +140,9 @@ @click="showAnotherMonth"> View more dates - + :selectedDate="selectedDate" // used in date-picker + :appointmentType="appointmentType" // used in date-picker for duration + :premiumAppointmentFee="premiumAppointmentFee" // Removed from date-picker + :displayWaitList="displayWaitList" // Removed from date-picker + :timeSlotsForSelectedDate="timeSlotsForSelectedDate" // Removed from date-picker (but it had a null check for is-same-day) + :estimatedServiceMinutesMinimum="estimatedServiceMinutesMinimum" // used in date-picker for duration + :estimatedServiceMinutesMaximum="estimatedServiceMinutesMaximum" // used in date-picker for duration + @waitListRequested="handleWaitListRequested" // removed, it's a pass-through /> --> @@ -206,7 +205,6 @@ export default { months: null, disableViewMoreDatesButton: false, hideSomeDaysForInitialView: null, - selectedTimeSlotInfo: this.getSelectedTimeSlotInfo(), selectableDatesInshop: [], // NOTE: this and the mobile version below use monthNum (1-based), NOT monthIndex (0-based) selectableDatesMobile: [], durationTextBlockCopyForInshopOrDropoff: null, @@ -243,12 +241,9 @@ export default { pricingByDayBasePrice: Number, pricingByDayUpcharge: Number, isPricingByDayExperiment: Boolean, - timeSlotsForSelectedDate: Object, appointmentType: String, - premiumAppointmentFee: Object, estimatedServiceMinutesMinimum: Number, estimatedServiceMinutesMaximum: Number, - displayWaitList: Boolean, isMobileSelected: Boolean, }, setup(props) { @@ -373,9 +368,6 @@ export default { return null; }, isSameDay() { - if (!this.timeSlotsForSelectedDate) { - return false; - } const todaysDate = new Date().toISOString().split("T")[0]; return this.selectedDate === todaysDate; }, @@ -383,7 +375,6 @@ export default { methods: { async initializeComponent(initialData) { await this.setCalendarData(initialData); - this.$refs.timeSlotModalQuestion.initializeComponent(); }, fireDateSelectedEvent(event, date) { // Ignore if arrow key selected radioButton @@ -950,30 +941,9 @@ export default { }; window.requestAnimationFrame(step); }, - getSelectedTimeSlotInfo() { - const supportingItems = this.getSupportingItems(); - - var isPremiumAppointment = false; - if (supportingItems) { - isPremiumAppointment = - !!supportingItems.filter( - (lineItem) => lineItem.partType === PREMIUM_FEE_PART_TYPE - ).length > 0; - } - - const selectedTimeSlotInfo = { - timeSlot: store.getters.order.schedule, - isPremiumAppointment: isPremiumAppointment, - }; - - return selectedTimeSlotInfo; - }, getSupportingItems() { return store.getters.lineItems.supportingItems; }, - handleWaitListRequested(value) { - this.$emit("waitListRequested", value); - }, getDurationTextBlockCopyForInshopOrDropoff(selectedRouteCode) { if (selectedRouteCode?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { return this.overnightDropoffDurationText; @@ -999,17 +969,10 @@ export default { this.scrollToElement("date-of-month-error"); } }, - selectedTimeSlotInfo(newValue) { - const routeCode = newValue?.timeSlot?.routeCode; - this.durationTextBlockCopyForInshopOrDropoff = - this.getDurationTextBlockCopyForInshopOrDropoff(routeCode); - this.$emit("TimeSlotSelected", newValue); // needed to update footer button text on Schedule page and to save to Store correctly - }, }, components: { loader, ErrorMessage, - timeSlotQuestion, textBlock, funnelSubHeader, }, diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 0e68cb458..24635a1f5 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -133,13 +133,28 @@ :pricingByDayUpcharge="pricingByDayUpcharge" :showPricingByDay="showPricingByDay" :isPricingByDayExperiment="isPricingByDayExperiment" - :timeSlotsForSelectedDate="timeSlotsForSelectedDate" :appointmentType="appointmentType" - :premiumAppointmentFee="mobilePremiumAppointmentFee" :estimatedServiceMinutesMinimum="getServiceMinutesMin" - :estimatedServiceMinutesMaximum="getServiceMinutesMax" + :estimatedServiceMinutesMaximum="getServiceMinutesMax" /> +