diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 3d517fd85..5b35792dd 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -1354,23 +1354,6 @@ export default { } } } - - .inshop-version { - color: limegreen !important; // TODO - THIS IS TEMPORARY CODE; TO BE REMOVED AS PART OF CASH-845 - } - .mobile-version { - color: red !important; // TODO - THIS IS TEMPORARY CODE; TO BE REMOVED AS PART OF CASH-845 - } - .radio-wrapper.inshop-version { - &.selectable-day label span { - color: limegreen !important; // TODO - THIS IS TEMPORARY CODE; TO BE REMOVED AS PART OF CASH-845 - } - } - .radio-wrapper.mobile-version { - &.selectable-day label span { - color: red !important; // TODO - THIS IS TEMPORARY CODE; TO BE REMOVED AS PART OF CASH-845 - } - } } } :deep(.button-inner-wrapper) { diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 98f5d60ea..ee2096c36 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -76,6 +76,7 @@ import { } from "@/layouts/schedule/helpers/schedule-helper"; import { AppointmentTypeStrings, + RouteCodeFlags, PREMIUM_FEE_PART_TYPE, PRICING_BY_DAY_PART_TYPE, } from "@/constants/schedule-constants"; @@ -447,7 +448,7 @@ export default { if (this.isMobileSelected) { return "Mobile"; } else { - return "Inshop"; + return "InshopOrDropoff"; } }, getServiceMinutesMin() { @@ -569,10 +570,14 @@ export default { timeSlotInfo.timeSlot.date )}`; - if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) { - navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime( - timeSlotInfo.timeSlot.startTime - )}`; + if (this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF) { + if ( + !timeSlotInfo.timeSlot.routeCode.includes(RouteCodeFlags.ALL_DAY_DROP_OFF) + ) { + navbarButtonText += ` at ${this.getDisplayTextForMilitaryTime( + timeSlotInfo.timeSlot.startTime + )}`; + } } else if ( this.appointmentType === AppointmentTypeStrings.MOBILE && !timeSlotInfo.isPremiumAppointment diff --git a/src/layouts/schedule/time-slot-question/time-slot-question.vue b/src/layouts/schedule/time-slot-question/time-slot-question.vue index 58648746e..a245e1d17 100644 --- a/src/layouts/schedule/time-slot-question/time-slot-question.vue +++ b/src/layouts/schedule/time-slot-question/time-slot-question.vue @@ -14,7 +14,7 @@ class="mt-4" :class="[ isMobileAppointment ? 'is-mobile-appointment' : '', - isDropOffAppointment ? 'is-drop-off-appointment' : '', + isInshopOrDropOffAppointment ? 'is-inshop-or-drop-off-appointment' : '', ]" :answers="availableTimeSlots" groupName="chooseTimeSlot" @@ -329,14 +329,12 @@ export default { return null; } - if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) { - return this.getAvailableTimeSlotsForDropOff( - this.timeSlotsForSelectedDate.timeSlots - ); - } else if (this.appointmentType === AppointmentTypeStrings.MOBILE) { + if (this.appointmentType === AppointmentTypeStrings.MOBILE) { return this.getAvailableTimeSlotsForMobile(this.timeSlotsForSelectedDate.timeSlots); } else { - return this.getAvailableTimeSlotsForInshop(this.timeSlotsForSelectedDate.timeSlots); + return this.getAvailableTimeSlotsForInshopOrDropOff( + this.timeSlotsForSelectedDate.timeSlots + ); } }, hasWaitListExperiment() { @@ -357,8 +355,8 @@ export default { isMobileAppointment() { return this.appointmentType === AppointmentTypeStrings.MOBILE; }, - isDropOffAppointment() { - return this.appointmentType === AppointmentTypeStrings.DROP_OFF; + isInshopOrDropOffAppointment() { + return this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF; }, }, methods: { @@ -408,6 +406,26 @@ export default { return availableTimeSlots; }, + getAvailableTimeSlotsForInshopOrDropOff(timeSlotsForSelectedDate) { + const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => { + let buttonLabelValue; + if (timeSlot.id.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { + buttonLabelValue = this.dropoffButtonText; + } else if (timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { + buttonLabelValue = this.overnightDropoffButtonText; + } else if (this.isSameDay) { + buttonLabelValue = this.sameDayDropoffButtonText; + } else { + buttonLabelValue = militaryToTwelveHourTime(timeSlot.startTime); + } + return { + value: timeSlot.id, + buttonLabel: buttonLabelValue, + }; + }); + + return availableTimeSlots; + }, getAvailableTimeSlotsForMobile(timeSlotsForSelectedDate) { const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => { const readableTime = `${militaryToTwelveHourTime(timeSlot.startTime)} - ${militaryToTwelveHourTime(