fix: rr-host booked outside of availability (#12704)
* correctly query overlapping bookings * remove console.log * fix getting busy bookings for getAvailableSlots --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
This commit is contained in:
parent
c53e891c8a
commit
f87eac193f
|
@ -54,7 +54,6 @@ test.describe("Organization", () => {
|
|||
// Code verification
|
||||
await expect(page.locator("#modal-title")).toBeVisible();
|
||||
await page.locator("input[name='2fa1']").fill(generateTotpCode(`john@${orgDomain}.com`));
|
||||
await page.locator("button:text('Verify')").click();
|
||||
|
||||
// Check admin email about DNS pending action
|
||||
await expectInvitationEmailToBeReceived(
|
||||
|
|
|
@ -83,9 +83,10 @@ export async function getBusyTimes(params: {
|
|||
const endTimeDate =
|
||||
rescheduleUid && duration ? dayjs(endTime).add(duration, "minute").toDate() : new Date(endTime);
|
||||
|
||||
// startTime is less than endTimeDate and endTime grater than startTimeDate
|
||||
const sharedQuery = {
|
||||
startTime: { gte: startTimeDate },
|
||||
endTime: { lte: endTimeDate },
|
||||
startTime: { lte: endTimeDate },
|
||||
endTime: { gte: startTimeDate },
|
||||
status: {
|
||||
in: [BookingStatus.ACCEPTED],
|
||||
},
|
||||
|
|
|
@ -328,8 +328,8 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions) {
|
|||
input.rescheduleUid && durationToUse ? endTime.add(durationToUse, "minute").toDate() : endTime.toDate();
|
||||
|
||||
const sharedQuery = {
|
||||
startTime: { gte: startTimeDate },
|
||||
endTime: { lte: endTimeDate },
|
||||
startTime: { lte: endTimeDate },
|
||||
endTime: { gte: startTimeDate },
|
||||
status: {
|
||||
in: [BookingStatus.ACCEPTED],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user