diff --git a/backend/dataconnect/connector/application/queries.gql b/backend/dataconnect/connector/application/queries.gql index 6de03a97..f50bdce6 100644 --- a/backend/dataconnect/connector/application/queries.gql +++ b/backend/dataconnect/connector/application/queries.gql @@ -356,3 +356,44 @@ query listAcceptedApplicationsByBusinessForDay( staff { id fullName email phone photoUrl } } } + +#coverage list +query listStaffsApplicationsByBusinessForDay( + $businessId: UUID! + $dayStart: Timestamp! + $dayEnd: Timestamp! + $offset: Int + $limit: Int +) @auth(level: USER) { + applications( + where: { + status: {in: [ACCEPTED, CONFIRMED, CHECKED_IN, CHECKED_OUT, LATE]} + shift: { + date: { ge: $dayStart, le: $dayEnd } + order: { businessId: { eq: $businessId } } + #status: { eq: ACCEPTED } + } + } + offset: $offset + limit: $limit + orderBy: { appliedAt: ASC } + ) { + id + shiftId + roleId + checkInTime + checkOutTime + appliedAt + status + shiftRole{ + shift{ + location + } + + role{ + name + } + } + staff { id fullName email phone photoUrl } + } +} \ No newline at end of file