-
Notifications
You must be signed in to change notification settings - Fork 9.3k
feat: Add option to include no shows in RR calculations #21063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
aeadee6
eab1548
4ded5e2
b6855ff
37f3a71
2adfeaf
ff776b6
fa0511a
018d0fa
151d632
f970bba
5470014
674656e
7c743dc
f34956e
7ee80e9
2a6c44f
aef93e1
b7ef8b8
bf984fb
9ce7153
3a28894
163ab7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ export const filterHostsByLeadThreshold = async <T extends BaseHost<BaseUser>>({ | |
parentId?: number | null; | ||
rrResetInterval: RRResetInterval | null; | ||
} | null; | ||
includeNoShowInRRCalculation: boolean; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing documentation for the new property that explains its purpose and impact on round robin calculations |
||
}; | ||
routingFormResponse: RoutingFormResponse | null; | ||
}) => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,7 @@ interface GetLuckyUserParams<T extends PartialUser> { | |
id: number; | ||
isRRWeightsEnabled: boolean; | ||
team: { parentId?: number | null; rrResetInterval: RRResetInterval | null } | null; | ||
includeNoShowInRRCalculation: boolean; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing default value for includeNoShowInRRCalculation parameter in getBookingsOfInterval function |
||
}; | ||
// all routedTeamMemberIds or all hosts of event types | ||
allRRHosts: { | ||
|
@@ -423,18 +424,21 @@ async function getBookingsOfInterval({ | |
users, | ||
virtualQueuesData, | ||
interval, | ||
includeNoShowInRRCalculation, | ||
}: { | ||
eventTypeId: number; | ||
users: { id: number; email: string }[]; | ||
virtualQueuesData: VirtualQueuesDataType | null; | ||
interval: RRResetInterval; | ||
includeNoShowInRRCalculation: boolean; | ||
}) { | ||
return await BookingRepository.getAllBookingsForRoundRobin({ | ||
eventTypeId: eventTypeId, | ||
users, | ||
startDate: getIntervalStartDate(interval), | ||
endDate: new Date(), | ||
virtualQueuesData, | ||
includeNoShowInRRCalculation, | ||
}); | ||
} | ||
|
||
|
@@ -611,13 +615,15 @@ async function fetchAllDataNeededForCalculations< | |
}), | ||
virtualQueuesData: virtualQueuesData ?? null, | ||
interval, | ||
includeNoShowInRRCalculation: eventType.includeNoShowInRRCalculation, | ||
}), | ||
|
||
getBookingsOfInterval({ | ||
eventTypeId: eventType.id, | ||
users: notAvailableHosts, | ||
virtualQueuesData: virtualQueuesData ?? null, | ||
interval, | ||
includeNoShowInRRCalculation: eventType.includeNoShowInRRCalculation, | ||
}), | ||
|
||
getBookingsOfInterval({ | ||
|
@@ -627,6 +633,7 @@ async function fetchAllDataNeededForCalculations< | |
}), | ||
virtualQueuesData: virtualQueuesData ?? null, | ||
interval, | ||
includeNoShowInRRCalculation: eventType.includeNoShowInRRCalculation, | ||
}), | ||
|
||
prisma.host.findMany({ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only show the RR distribution box for RR events