fix: booking limits for team event types (#14135)
* use bookings from all users * add same changes to handleNewBooking --------- Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
1 parent
ece74cbc49
commit
aaf630ed18
2 files changed
+2
-4
No files matched your search
@@ -371,7 +371,7 @@ export async function ensureAvailableUsers(
|
||||
user,
|
||||
eventType,
|
||||
rescheduleUid: input.originalRescheduledBooking?.uid ?? null,
|
||||
busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers.filter((b) => b.userId === user.id),
|
||||
busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -472,9 +472,7 @@ export async function getAvailableSlots({ input, ctx }: GetScheduleOptions) {
|
||||
const { attendees: _attendees, ...bookingWithoutAttendees } = bookings;
|
||||
return bookingWithoutAttendees;
|
||||
}),
|
||||
busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers.filter(
|
||||
(b) => b.userId === currentUser.id
|
||||
),
|
||||
busyTimesFromLimitsBookings: busyTimesFromLimitsBookingsAllUsers,
|
||||
}
|
||||
);
|
||||
if (!currentSeats && _currentSeats) currentSeats = _currentSeats;
|
||||
|
||||
Reference in new issue
Block a user