From 8fefa39fea148fcef827677feaaef5d40d8f945b Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 27 Jan 2026 13:35:24 -0500 Subject: [PATCH] some updates for integration --- .../date-picker/date-picker.vue | 17 +- src/helpers/service-location-helper.js | 5 - src/layouts/schedule-page/schedule-page.vue | 168 +++++++---- .../service-location/service-location.vue | 275 ++++++++++-------- .../service-zip-question.vue | 1 - src/store/index.js | 7 +- 6 files changed, 280 insertions(+), 193 deletions(-) diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index cf24627b..0f9aa7fa 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -153,6 +153,10 @@ import { selectableDaysOptions } from './mixins/helpers'; export default { name: 'date-picker', props: { + activeAppointmentType: { + type: String, + default: null + }, customComponentId: String, selectableDatesSetting: { type: String, @@ -168,6 +172,10 @@ export default { modelValue: { type: Object }, + mobileZipCode: { + type: String, + default: null + }, todayOverrideDateString: { // keep for use in unit tests to override today's date type: String, @@ -315,6 +323,7 @@ export default { this.setCalendarData(initialData); }, resetComponent() { + console.log('Resetting Date Picker Component'); this.isLoading = true; this.selectableDatesData = []; // NOTE: uses monthNum (1-based), NOT monthIndex (0-based) this.selectableTimeSlotsData = []; @@ -376,7 +385,7 @@ export default { }; }, displayTimeSlotTime(timeSlot) { - const { appointmentType } = this.mainStore.order.serviceLocation; + const appointmentType = this.activeAppointmentType || AppointmentTypeStrings.IN_SHOP; if (appointmentType === AppointmentTypeStrings.MOBILE || appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP) { return `${militaryToTwelveHourTime(timeSlot.startTime)} - ${militaryToTwelveHourTime(timeSlot.endTime)}`; } @@ -555,8 +564,6 @@ export default { this.selectTimeSlotForDay(timeSlot); }, async setCalendarData(config = {}) { - // const initialMql = window.matchMedia('(min-width: 1200px)'); - // this.isMobileView = !initialMql.matches; config.initialShopTimeSlotsResponse.days.forEach((selectableDate) => { const dateObjectToPush = { date: selectableDate.date, @@ -618,9 +625,7 @@ export default { const moreSelectableDates = await this.customSelectableDatesCallback( dateStart, - dateEnd, - this.mainStore.order.serviceLocation.appointmentType, - this.mainStore.order.serviceLocation.provider.providerNumber + dateEnd ); moreSelectableDates.days.forEach((selectableDate) => { diff --git a/src/helpers/service-location-helper.js b/src/helpers/service-location-helper.js index 106aa34c..25265ea6 100644 --- a/src/helpers/service-location-helper.js +++ b/src/helpers/service-location-helper.js @@ -58,11 +58,6 @@ export async function getAvailabilityRating( providerNumber ) { // For a given shop provider number and date range, get the appointment time slots available - console.log('Getting shop time slots for availability rating...'); - console.log(`Provider Number: ${providerNumber}`); - console.log(`Start Date: ${startDate}`); - console.log(`End Date: ${endDate}`); - console.log(`Shop Appointment Type: ${shopAppointmentType}`); const shopTimeSlots = await useMainStore().getShopTimeSlots(startDate, endDate, shopAppointmentType, providerNumber); const numberOfDaysToEvaluate = 2; diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index f800cb62..75357316 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -19,9 +19,9 @@ + @mobileZipUpdated="mobileZipUpdatedFromServiceLocation" + @providerChanged="providerChangedFromServiceLocation" + @serviceLocationUpdated="serviceLocationUpdatedFromServiceLocation" />