Skip to content

Commit

Permalink
fix(room-booking): couldn't book after last booking in timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Oct 26, 2024
1 parent 5e70d7b commit a66f6aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/room-booking/timeline/BookingTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ function rangeIntersectingBookings(
if (l !== r) return [];
if (bookings[l].startsAt.getTime() >= bMs)
if (
bookings[l].startsAt.getTime() >= bMs ||
bookings[l].endsAt.getTime() <= aMs
)
// First and doesn't intersect.
return [];
Expand Down Expand Up @@ -568,6 +571,7 @@ function validSlotByState(state: InteractionState): Slot | null {
state.hoverAt.room.id,
);
console.log({ range });
if (!range) return null;
return {
Expand Down

0 comments on commit a66f6aa

Please sign in to comment.