CASH-1214: Clear selectedRouteCode if no time slot is selected

This commit is contained in:
Chris Redelinghuys 2025-07-24 14:36:19 -04:00
parent 1d79c167ad
commit e32a1cd9c4

View file

@ -206,6 +206,10 @@ export default {
// ); // );
// } // }
} else { } else {
if (!this.selectedAnswerForTimeSlots && this.selectedRouteCode) {
// Clearing selectedRouteCode if no time slot is selected
this.resetSelectedTimeSlot();
}
appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes( appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes(
PREMIUM_TIME_SLOT_ID_FLAG PREMIUM_TIME_SLOT_ID_FLAG
) )
@ -552,9 +556,12 @@ export default {
return slot.id === selectedRouteCodeString; return slot.id === selectedRouteCodeString;
}); });
if (!matchingTimeSlot) { if (!matchingTimeSlot) {
this.resetSelectedTimeSlot();
}
}
},
resetSelectedTimeSlot() {
this.selectedRouteCode = null; this.selectedRouteCode = null;
}
}
}, },
}, },
watch: { watch: {