Don't set appointment type when no appointment/routecode is present.

This commit is contained in:
Chloe Herd 2025-07-21 15:28:49 -04:00
parent ce69670521
commit 1df3a739ad

View file

@ -1534,8 +1534,17 @@ export default {
},
updateTimeSlot(timeSlotObj) {
this.selectedTimeSlotInfo = timeSlotObj;
if (this.appointmentType !== AppointmentTypeStrings.MOBILE) {
if (
this.appointmentType !== AppointmentTypeStrings.MOBILE &&
this.appointmentType !== null
) {
// update apptType based on routeCode to determine if it should be dropoff or inshop
debugLog(`Updating appointment type based on route code.`);
debugLog(`Route code =`, timeSlotObj.timeSlot.routeCode);
debugLog(
`Parsed type = `,
this.getInShopOrDropOffApptType(timeSlotObj.timeSlot.routeCode)
);
this.appointmentType = this.getInShopOrDropOffApptType(
timeSlotObj.timeSlot.routeCode
);