diff --git a/packages/features/bookings/Booker/components/hooks/useSlots.ts b/packages/features/bookings/Booker/components/hooks/useSlots.ts index faebef50984eec..26752a329e8278 100644 --- a/packages/features/bookings/Booker/components/hooks/useSlots.ts +++ b/packages/features/bookings/Booker/components/hooks/useSlots.ts @@ -123,7 +123,7 @@ export const useSlots = (event: { id: number; length: number } | null) => { eventTypeId, eventDuration, timeslotsAsISOString: allUniqueSelectedTimeslots, - slotReservationId, + slotReservationId: slotReservationId || undefined, }); // In case of skipConfirm flow selectedTimeslot would never be set and instead we could have multiple tentatively selected timeslots, so we pick the latest one from it. @@ -145,7 +145,7 @@ export const useSlots = (event: { id: number; length: number } | null) => { const interval = setInterval(() => { handleReserveSlot(); - }, parseInt(MINUTES_TO_BOOK) * 60 * 1000 - 2000); + }, (parseInt(MINUTES_TO_BOOK) - 2000) * 60 * 1000); return () => { handleRemoveSlot(); diff --git a/packages/features/bookings/Booker/config.ts b/packages/features/bookings/Booker/config.ts index 8a5f331dac284f..809eea6257369d 100644 --- a/packages/features/bookings/Booker/config.ts +++ b/packages/features/bookings/Booker/config.ts @@ -231,7 +231,7 @@ export const extraDaysConfig = { tablet: 0, }, [BookerLayouts.WEEK_VIEW]: { - desktop: 7, + desktop: 6, tablet: 4, }, [BookerLayouts.COLUMN_VIEW]: { diff --git a/packages/features/bookings/Booker/utils/isTimeslotAvailable.ts b/packages/features/bookings/Booker/utils/isTimeslotAvailable.ts index 0b8b8ceb05e7ec..5dceb82d08b0c5 100644 --- a/packages/features/bookings/Booker/utils/isTimeslotAvailable.ts +++ b/packages/features/bookings/Booker/utils/isTimeslotAvailable.ts @@ -44,7 +44,7 @@ function _isSlotPresentInSchedule({ // Timezones can't be more than 1 day apart, so we can safely assume that previous and next day covers all the dates where a time slot can be present // We don't want to look up for a slot over all the dates in the schedule data unnecessarily for performance reasons const dateBefore = dayjs(dateInGMT).subtract(1, "day").format("YYYY-MM-DD"); - const dateAfter = dayjs(dateInGMT).add(1, "day").format("YYYY-MM-DD"); + const dateAfter = dayjs(dateInGMT).add(2, "day").format("YYYY-MM-DD"); // No matter what timezone the booker is in, the slot has to be in one of these three dates const slotsInIsoForDate = scheduleData.slots[dateInGMT] as Maybe; @@ -81,7 +81,7 @@ export const isTimeSlotAvailable = ({ const isUnavailableAsPerQuickCheck = quickAvailabilityChecks && quickAvailabilityChecks.some( - (slot) => slot.utcStartIso === slotToCheckInIso && slot.status !== "available" + (slot) => slot.utcStartIso === slotToCheckInIso && slot.status === "available" ); if (isUnavailableAsPerQuickCheck) return false;