adding validations for apply

This commit is contained in:
José Salazar
2026-02-02 07:14:54 +09:00
parent 136993caec
commit 761830b380
8 changed files with 19483 additions and 18413 deletions

View File

@@ -350,6 +350,91 @@ query getApplicationsByStaffId(
}
}
query vaidateDayStaffApplication(
$staffId: UUID!
$offset: Int
$limit: Int
$dayStart: Timestamp
$dayEnd: Timestamp
) @auth(level: USER) {
applications(
where: {
staffId: { eq: $staffId }
shift: {
date: { ge: $dayStart, le: $dayEnd }
}
}
offset: $offset
limit: $limit
) {
id
shiftId
staffId
status
appliedAt
checkInTime
checkOutTime
origin
createdAt
shift {
id
title
date
startTime
endTime
location
status
durationDays
description
order {
id
eventName
#location
teamHub {
address
placeId
hubName
}
business {
id
businessName
email
contactName
companyLogoUrl
}
vendor {
id
companyName
}
}
}
shiftRole {
id
roleId
count
assigned
startTime
endTime
hours
totalValue
role {
id
name
costPerHour
}
}
}
}
#validation before apply
query getApplicationByStaffShiftAndRole(
$staffId: UUID!