Fixes collective availability for teams with overlapping day timezones (#3898)
* WIP
* Fix for team availability with time offsets
* Prevent empty schedule from opening up everything
* When no utcOffset or timeZone's are given, default to 0 utcOffset (UTC)
* timeZone should not be part of getUserAvailability
* Prevents {days:[X],startTime:0,endTime:0} error entry
* Added getAggregateWorkingHours() (#3913)
* Added test for getAggregateWorkingHours
* Timezone isn't used here anymore
* fix: developer docs url (#3914)
* fix: developer docs url added
* chore : remove /
* chore : import url
Co-authored-by: Zach Waterfield <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
* Test fixes
* Reinstate prisma (generate only) and few comments
* Test fixes
* Skipping getSchedule again
* Added await to expect() as it involves async logic causing the promise to timeout
* Test cleanup
* Update jest.config.ts
Co-authored-by: Alan <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Udit Takkar <[email protected]>
Co-authored-by: Zach Waterfield <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
15 files changed
+317
-181
No files matched your search
@@ -9,7 +9,7 @@ async function leastRecentlyBookedUser<T extends Pick<User, "id">>({
|
||||
availableUsers: T[];
|
||||
eventTypeId: number;
|
||||
}) {
|
||||
const usersWithLastCreated = await prisma?.user.findMany({
|
||||
const usersWithLastCreated = await prisma.user.findMany({
|
||||
where: {
|
||||
id: {
|
||||
in: availableUsers.map((user) => user.id),
|
||||
|
||||
Reference in new issue
Block a user