@@ -31,7 +23,6 @@
selectableDatesSetting="custom"
ref="datePicker"
v-model="selectedDate"
- v-model:new="selectedTimeSlotInfo"
class="text-link-small"
:customSelectableDatesCallback="getAvailableDatesMethod"
validationRules="date-required"
@@ -39,41 +30,9 @@
:pricingByDayUpcharge="pricingByDayUpcharge"
:showPricingByDay="showPricingByDay"
:isPricingByDayExperiment="isPricingByDayExperiment"
-
- :selectedTimeSlotInfo="selectedTimeSlotInfo"
:timeSlotsForSelectedDate="timeSlotsForSelectedDate"
-
@TimeSlotSelected="updateTimeSlot"
-
@date-clicked="handleDateClicked" />
-
-
{
- 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;
-// });
+defineRule("date-required", required(errorMessages.DATE_REQUIRED));
// Define constants
const TIME_SLOTS_CALL_DAYS_LIMIT = 34; // needs to be 34 for API limits (35 does not consistently work)
@@ -425,14 +366,11 @@ 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
@@ -495,9 +433,6 @@ export default {
getServiceZipCtuCodeFromStore() {
return store.getters.order.serviceLocation.zipCodeCtu;
},
- openInshopTimeSlotsModal() {
- this.$refs["timeSlotModalQuestion"].openModal();
- },
getSelectedDate() {
return store.getters.order.schedule.date;
},
@@ -517,20 +452,11 @@ export default {
isPremiumAppointment: isPremiumAppointment,
};
- console.log("SCHEDULE, computing getSelectedTimeSlotInfo()... returning: ", selectedTimeSlotInfo)
- debugger; // eslint-disable-line no-debugger
-
return selectedTimeSlotInfo;
},
getSupportingItems() {
return store.getters.lineItems.supportingItems;
},
- timeSlotModalClosed() {
- // Clear the selectedDate if no timeSlot has been selected
- if (this.selectedTimeSlotInfo.timeSlot.routeCode == null) {
- this.selectedDate = null;
- }
- },
updateFooterButtonText(timeSlotInfo) {
let navbarButtonText;
if (!timeSlotInfo || !timeSlotInfo.timeSlot.date) {
@@ -585,9 +511,6 @@ 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) {
@@ -742,24 +665,13 @@ export default {
} else {
this.includePricingByDayUpcharge = false;
}
-
- // 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 = {
@@ -776,10 +688,6 @@ export default {
}
},
selectedTimeSlotInfo(newValue) {
-
- console.log("SCHEDULE WATCHED selectedTimeSlotInfo was updated to: ", newValue)
- debugger; // eslint-disable-line no-debugger
-
this.updateFooterButtonText(newValue);
},
},
@@ -791,7 +699,6 @@ export default {
loadingModal,
datePicker,
locationAlerts,
- timeSlotModalQuestion,
textBlock,
},
};
@@ -822,24 +729,4 @@ export default {
}
}
-
-
-
-.modal-open {
- overflow: auto !important;
- padding-right: auto !important;
-
- .modal {
- position: relative;
- display: block;
- height: auto;
- }
- .modal-backdrop {
- display: none !important;
- }
-}
-
-
-
-