CASH-814 | Cleanup pt 1

This commit is contained in:
Scott Kiener 2025-07-09 09:29:37 -04:00
parent 056d2b6f5c
commit b2615f3db8

View file

@ -196,26 +196,25 @@ export default {
let appointmentTypeCmsWidgetName;
if (this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF) {
// This is planned to be used again for drop-off
// Leaving this here with that in mind, move logic from the final else in here
// and only apply it when a dropoff slot is selected
return null;
} else if (this.appointmentType === AppointmentTypeStrings.MOBILE) {
// This is planned to be used again for drop-off
// Wrote this to be ready for that eventuality, is untested and no HTML work done yet
// if (this.selectedRouteCode == null || !this.isDropOffRouteCode(this.selectedRouteCode)) {
// return null;
// } else {
// appointmentTypeCmsWidgetName =
// this.getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(
// this.selectedRouteCode,
// true
// );
// }
} else {
appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes(
PREMIUM_TIME_SLOT_ID_FLAG
)
? this.mobilePremiumCmsWidgetName
: this.mobileCmsWidgetName;
} else {
if (!this.selectedRouteCode) {
return null;
} else {
appointmentTypeCmsWidgetName =
this.getRelevantDropOffCmsWidgetNameForSelectedTimeSlot(
this.selectedRouteCode,
true
);
}
}
return this.getCmsContent(
@ -223,12 +222,6 @@ export default {
cmsWidgetFieldMappings.SUPPLEMENTAL_INFORMATION
);
},
footerCloseButtonText() {
return this.getCmsContent(
this.cmsWidgetName,
cmsWidgetFieldMappings.MODAL_CLOSE_BUTTON
);
},
dropOffOrPickATimeQuestionLabelText() {
return this.getCmsContent(this.dropOffOrPickATimeQuestionCmsWidgetName, "QuestionText");
},
@ -260,38 +253,40 @@ export default {
cmsWidgetFieldMappings.TIME_SLOT_BUTTON
);
},
dropoffDisclaimerText() {
return this.getCmsContent(this.dropoffCmsWidgetName, cmsWidgetFieldMappings.DISCLAIMER);
},
sameDayDropOffDisclaimerText() {
return this.getCmsContent(
this.sameDayDropOffCmsWidgetName,
cmsWidgetFieldMappings.DISCLAIMER
);
},
overnightDropOffDisclaimerText() {
return this.getCmsContent(
this.overnightDropOffCmsWidgetName,
cmsWidgetFieldMappings.DISCLAIMER
);
},
disclaimerTextBlockCopy() {
if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) {
if (this.selectedRouteCode?.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) {
if (this.isSameDay) {
return this.sameDayDropOffDisclaimerText;
} else {
return this.dropoffDisclaimerText;
}
} else if (this.selectedRouteCode?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) {
return this.overnightDropOffDisclaimerText;
} else {
return null;
}
} else {
return null;
}
},
// None of this is used, but apparently could be re-activated if we go back to
// complete parity with Heritage. If that plan is dropped, delete this
// dropoffDisclaimerText() {
// return this.getCmsContent(this.dropoffCmsWidgetName, cmsWidgetFieldMappings.DISCLAIMER);
// },
// sameDayDropOffDisclaimerText() {
// return this.getCmsContent(
// this.sameDayDropOffCmsWidgetName,
// cmsWidgetFieldMappings.DISCLAIMER
// );
// },
// overnightDropOffDisclaimerText() {
// return this.getCmsContent(
// this.overnightDropOffCmsWidgetName,
// cmsWidgetFieldMappings.DISCLAIMER
// );
// },
// disclaimerTextBlockCopy() {
// if (this.appointmentType === AppointmentTypeStrings.DROP_OFF) {
// if (this.selectedRouteCode?.includes(RouteCodeFlags.ALL_DAY_DROP_OFF)) {
// if (this.isSameDay) {
// return this.sameDayDropOffDisclaimerText;
// } else {
// return this.dropoffDisclaimerText;
// }
// } else if (this.selectedRouteCode?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF)) {
// return this.overnightDropOffDisclaimerText;
// } else {
// return null;
// }
// } else {
// return null;
// }
// },
dropOffDurationText() {
return this.getCmsContent(this.dropoffCmsWidgetName, cmsWidgetFieldMappings.DURATION);
},
@ -391,6 +386,7 @@ export default {
buttonLabel: buttonLabelValue,
};
});
// Only add the pick a time button if inShop timeslots are available
if (
this.getAvailableTimeSlotsForInshop(this.timeSlotsForSelectedDate.timeSlots)
.length !== 0
@ -648,7 +644,6 @@ export default {
},
},
components: {
// Removed modal
textBlock,
buttonQuestion,
checkboxQuestion,