fix: Handle booker UI busy or skip on timeslot (#18553)

This commit is contained in:
sean-brydon
2025-01-09 16:29:42 +00:00
committed by GitHub
parent 91526d0bc7
commit 23c93d75ca
@@ -91,22 +91,17 @@ const SlotItem = ({
const [overlapConfirm, setOverlapConfirm] = useState(false);
const onButtonClick = useCallback(() => {
if (!overlayCalendarToggled) {
if (!overlayCalendarToggled || (isOverlapping && overlapConfirm)) {
onTimeSelect(slot.time, slot?.attendees || 0, seatsPerTimeSlot, slot.bookingUid);
return;
}
if (isOverlapping && overlapConfirm) {
setOverlapConfirm(false);
return;
}
if (isOverlapping && !overlapConfirm) {
if (isOverlapping) {
setOverlapConfirm(true);
return;
}
if (!overlapConfirm) {
onTimeSelect(slot.time, slot?.attendees || 0, seatsPerTimeSlot, slot.bookingUid);
}
onTimeSelect(slot.time, slot?.attendees || 0, seatsPerTimeSlot, slot.bookingUid);
}, [
overlayCalendarToggled,
isOverlapping,