solving problems of validations and adding query of application

This commit is contained in:
José Salazar
2026-02-17 10:06:32 -05:00
parent 2ebe40a920
commit 869ece91a2
3 changed files with 38 additions and 2 deletions

View File

@@ -543,6 +543,36 @@ query listAcceptedApplicationsByShiftRoleKey(
}
}
query listOverlappingAcceptedApplicationsByStaff(
$staffId: UUID!
$newStart: Timestamp!
$newEnd: Timestamp!
$offset: Int
$limit: Int
) @auth(level: USER) {
applications(
where: {
staffId: { eq: $staffId }
status: { in: [ CONFIRMED, CHECKED_IN, CHECKED_OUT, LATE ] }
shiftRole: {
startTime: { lt: $newEnd }
endTime: { gt: $newStart }
}
}
offset: $offset
limit: $limit
orderBy: { appliedAt: ASC }
) {
id
shiftId
roleId
checkInTime
checkOutTime
staff { id fullName email phone photoUrl }
shiftRole { startTime endTime }
}
}
#getting staffs of an shiftrole status for orders of the day view client
query listAcceptedApplicationsByBusinessForDay(
$businessId: UUID!