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 #getting staffs of an shiftrole status for orders of the day view client
query listAcceptedApplicationsByBusinessForDay( query listAcceptedApplicationsByBusinessForDay(
$businessId: UUID! $businessId: UUID!

View File

@@ -1,5 +1,5 @@
specVersion: "v1" specVersion: "v1"
serviceId: "krow-workforce-db" serviceId: "krow-workforce-db-validation"
location: "us-central1" location: "us-central1"
schema: schema:
source: "./schema" source: "./schema"
@@ -7,7 +7,7 @@ schema:
postgresql: postgresql:
database: "krow_db" database: "krow_db"
cloudSql: cloudSql:
instanceId: "krow-sql" instanceId: "krow-sql-validation"
# schemaValidation: "STRICT" # STRICT mode makes Postgres schema match Data Connect exactly. # schemaValidation: "STRICT" # STRICT mode makes Postgres schema match Data Connect exactly.
# schemaValidation: "COMPATIBLE" # COMPATIBLE mode makes Postgres schema compatible with Data Connect. # schemaValidation: "COMPATIBLE" # COMPATIBLE mode makes Postgres schema compatible with Data Connect.
connectorDirs: ["./connector"] connectorDirs: ["./connector"]

6
internal/launchpad/package-lock.json generated Normal file
View File

@@ -0,0 +1,6 @@
{
"name": "launchpad",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}