@@ -23,6 +31,7 @@
selectableDatesSetting="custom"
ref="datePicker"
v-model="selectedDate"
+ v-model:new="selectedTimeSlotInfo"
class="text-link-small"
:customSelectableDatesCallback="getAvailableDatesMethod"
validationRules="date-required"
@@ -30,34 +39,41 @@
:pricingByDayUpcharge="pricingByDayUpcharge"
:showPricingByDay="showPricingByDay"
:isPricingByDayExperiment="isPricingByDayExperiment"
- @date-clicked="handleDateClicked" />
-
+
+ @TimeSlotSelected="updateTimeSlot"
+
+ @date-clicked="handleDateClicked" />
+
+
{
- if (value?.timeSlot?.routeCode == null) {
- return errorMessages.DATE_REQUIRED;
- }
+// defineRule("date-required", required(errorMessages.DATE_REQUIRED));
+defineRule("date-required", (value) => {
+ console.log("SCHEDULE VALIDATION of date-required, value is: ", value)
+ debugger; // eslint-disable-line no-debugger
+
+ // if (!value || value == null || value?.length < 1) {
+ // return errorMessages.DATE_REQUIRED;
+ // }
return true;
});
+// defineRule("time-slot-selection-required", (value) => {
+// console.log("SCHEDULE VALIDATION of time-slot-selection-required, value is: ", value)
+// debugger; // eslint-disable-line no-debugger
+// if (value?.timeSlot?.routeCode == null) {
+// return "TIME SLOT VALIDATION FAILURE! " + errorMessages.DATE_REQUIRED;
+// }
+// return true;
+// });
// Define constants
const TIME_SLOTS_CALL_DAYS_LIMIT = 34; // needs to be 34 for API limits (35 does not consistently work)
@@ -398,8 +425,15 @@ export default {
return this.$store.getters.order.serviceLocation.appointmentType;
},
timeSlotsForSelectedDate() {
+ console.log("SCHEDULE, computing timeSlotsForSelectedDate... this.selectedDate: ", this.selectedDate)
if (!this.selectedDate) return null;
+ let tempOutput = this.selectableDatesData.days?.find(
+ (selectableDate) => selectableDate.date === this.selectedDate
+ );
+ console.log("SCHEDULE, computing timeSlotsForSelectedDate... returning: ", tempOutput)
+ debugger; // eslint-disable-line no-debugger
+
return this.selectableDatesData.days?.find(
(selectableDate) => selectableDate.date === this.selectedDate
);
@@ -483,6 +517,9 @@ export default {
isPremiumAppointment: isPremiumAppointment,
};
+ console.log("SCHEDULE, computing getSelectedTimeSlotInfo()... returning: ", selectedTimeSlotInfo)
+ debugger; // eslint-disable-line no-debugger
+
return selectedTimeSlotInfo;
},
getSupportingItems() {
@@ -548,6 +585,9 @@ export default {
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
},
forwardButtonAction() {
+ console.log(" ")
+ console.log("SCHEDULE, forwardButtonAction... this.selectedTimeSlotInfo: ", this.selectedTimeSlotInfo)
+ debugger; // eslint-disable-line no-debugger
this.updateSupportingItems();
if (this.waitListRequested) {
@@ -703,11 +743,23 @@ export default {
this.includePricingByDayUpcharge = false;
}
- this.openInshopTimeSlotsModal();
+ // this.openInshopTimeSlotsModal(); // TURNON OR TURNOFF OLD MODAL OLDMODAL AJC
},
+
+
+
+ updateTimeSlot(timeSlot) {
+ console.log(" << NEW >> updateTimeSlot()... timeSlot: ", timeSlot)
+ debugger; // eslint-disable-line no-debugger
+ this.selectedTimeSlotInfo = timeSlot;
+ }
},
watch: {
selectedDate(newValue, oldValue) {
+ console.log("SCHEDULE WATCHED selectedDate was updated to: ", newValue)
+ debugger; // eslint-disable-line no-debugger
+
+
// Clear time slot selection if date selected changes
if (newValue !== oldValue) {
this.selectedTimeSlotInfo = {
@@ -724,6 +776,10 @@ export default {
}
},
selectedTimeSlotInfo(newValue) {
+
+ console.log("SCHEDULE WATCHED selectedTimeSlotInfo was updated to: ", newValue)
+ debugger; // eslint-disable-line no-debugger
+
this.updateFooterButtonText(newValue);
},
},
@@ -765,4 +821,25 @@ export default {
margin-bottom: 0.25rem;
}
}
+
+
+
+
+.modal-open {
+ overflow: auto !important;
+ padding-right: auto !important;
+
+ .modal {
+ position: relative;
+ display: block;
+ height: auto;
+ }
+ .modal-backdrop {
+ display: none !important;
+ }
+}
+
+
+
+