From 048e5449bee4907084f6f612d899144808476ff7 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Thu, 22 Jun 2023 10:04:11 -0400 Subject: [PATCH] CSR-1449 | Formatting --- src/constants/schedule-constants.js | 2 +- .../time-slot-modal-question.vue | 42 +++++++++---------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/constants/schedule-constants.js b/src/constants/schedule-constants.js index 76094e636..86c2a793c 100644 --- a/src/constants/schedule-constants.js +++ b/src/constants/schedule-constants.js @@ -11,6 +11,6 @@ const PREMIUM_FEE_PART_TYPE = "EARLY BIRD"; const RouteCodeFlags = { ALL_DAY_DROP_OFF: "ALL DAY DROP OFF", OVERNIGHT_DROP_OFF: "OVERNIGHT DROP OFF", -} +}; export { AppointmentTypeStrings, PREMIUM_TIME_SLOT_ID_FLAG, PREMIUM_FEE_PART_TYPE, RouteCodeFlags }; diff --git a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue index 837a743f7..589b12cc5 100644 --- a/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue +++ b/src/layouts/schedule/time-slot-modal-question/time-slot-modal-question.vue @@ -120,9 +120,12 @@ export default { } else { if (!this.selectedTimeSlotId) { return null; - } - else { - appointmentTypeCmsWidgetName = this.getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(this.selectedTimeSlotId, true); + } else { + appointmentTypeCmsWidgetName = + this.getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( + this.selectedTimeSlotId, + true + ); } } return this.getCmsContent(appointmentTypeCmsWidgetName, "BodyText"); @@ -183,13 +186,9 @@ export default { } else if (this.appointmentType === AppointmentTypeStrings.IN_SHOP) { return this.inshopDurationText; } else { - if (this.selectedTimeSlotId?.includes( - RouteCodeFlags.OVERNIGHT_DROP_OFF - )) { + if (this.selectedTimeSlotId?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { return this.overnightDropoffDurationText; - } else if (this.selectedTimeSlotId?.includes( - RouteCodeFlags.ALL_DAY_DROP_OFF - )) { + } else if (this.selectedTimeSlotId?.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { return this.dropOffDurationText; } else { return null; @@ -204,7 +203,7 @@ export default { return false; } const selectedDate = this.dateAndTimeSlotData.date; - const todaysDate = (new Date()).toISOString().split("T")[0]; + const todaysDate = new Date().toISOString().split("T")[0]; return selectedDate === todaysDate; }, @@ -278,17 +277,16 @@ export default { } return displayTextForDurationLength; }, - getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(selectedTimeSlotId, isSameDayRelevant = false) { - if (selectedTimeSlotId.includes( - RouteCodeFlags.OVERNIGHT_DROP_OFF - )) { + getRelevantDropOffCmsWidgetNameForSelectedTimeSlot( + selectedTimeSlotId, + isSameDayRelevant = false + ) { + if (selectedTimeSlotId.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) { return this.overnightDropOffCmsWidgetName; - } else if (selectedTimeSlotId.includes( - RouteCodeFlags.ALL_DAY_DROP_OFF - )) { + } else if (selectedTimeSlotId.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) { return this.isSameDay && isSameDayRelevant - ? this.sameDayDropOffCmsWidgetName - : this.dropoffCmsWidgetName; + ? this.sameDayDropOffCmsWidgetName + : this.dropoffCmsWidgetName; } }, getAvailableTimeSlotsForInshop(timeSlotsForSelectedDate) { @@ -302,9 +300,9 @@ export default { }, getAvailableTimeSlotsForDropOff(timeSlotsForSelectedDate) { const availableTimeSlots = timeSlotsForSelectedDate.map((timeSlot) => { - const buttonLabelValue = timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF) ? - this.overnightDropoffButtonText : - this.dropoffButtonText; + const buttonLabelValue = timeSlot.id.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF) + ? this.overnightDropoffButtonText + : this.dropoffButtonText; return { value: timeSlot.id, buttonLabel: buttonLabelValue,