view shits of ordes by date
This commit is contained in:
@@ -302,3 +302,57 @@ query getApplicationsByStaffId(
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#getting staffs of an shiftrole ACCEPTED for orders view client
|
||||
query listAcceptedApplicationsByShiftRoleKey(
|
||||
$shiftId: UUID!
|
||||
$roleId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
applications(
|
||||
where: {
|
||||
shiftId: { eq: $shiftId }
|
||||
roleId: { eq: $roleId }
|
||||
status: { eq: ACCEPTED }
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { appliedAt: ASC }
|
||||
) {
|
||||
id
|
||||
checkInTime
|
||||
checkOutTime
|
||||
staff { id fullName email phone photoUrl }
|
||||
}
|
||||
}
|
||||
|
||||
#getting staffs of an shiftrole ACCEPTED for orders of the day view client
|
||||
query listAcceptedApplicationsByBusinessForDay(
|
||||
$businessId: UUID!
|
||||
$dayStart: Timestamp!
|
||||
$dayEnd: Timestamp!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
applications(
|
||||
where: {
|
||||
status: { eq: ACCEPTED }
|
||||
shift: {
|
||||
date: { ge: $dayStart, le: $dayEnd }
|
||||
order: { businessId: { eq: $businessId } }
|
||||
}
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { appliedAt: ASC }
|
||||
) {
|
||||
id
|
||||
shiftId
|
||||
roleId
|
||||
checkInTime
|
||||
checkOutTime
|
||||
appliedAt
|
||||
staff { id fullName email phone photoUrl }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user