Update shift assignment date filtering to improve accuracy
Modify the query in `server/routes.ts` to correctly filter shift assignments by comparing the date part of `shifts.startTime` with `routeData.shiftDate`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/kDVJJUd
This commit is contained in:
parent
f50d5deb60
commit
6430fbe707
@ -3708,7 +3708,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
.where(
|
||||
and(
|
||||
eq(shiftAssignments.guardId, routeData.guardId),
|
||||
eq(shifts.shiftDate, routeData.shiftDate)
|
||||
sql`DATE(${shifts.startTime}) = ${routeData.shiftDate}`
|
||||
)
|
||||
)
|
||||
.limit(1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user