fix: booking limits for team event types (#14135)
* use bookings from all users * add same changes to handleNewBooking --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com>
This commit is contained in:
co-authored by
CarinaWolli
parent
ece74cbc49
commit
aaf630ed18
@@ -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