From 6430fbe707f59e158ae4032736d3fa6f6a02b6b2 Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Thu, 23 Oct 2025 16:02:01 +0000 Subject: [PATCH] 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 --- server/routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes.ts b/server/routes.ts index 0f83184..e563a53 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -3708,7 +3708,7 @@ export async function registerRoutes(app: Express): Promise { .where( and( eq(shiftAssignments.guardId, routeData.guardId), - eq(shifts.shiftDate, routeData.shiftDate) + sql`DATE(${shifts.startTime}) = ${routeData.shiftDate}` ) ) .limit(1);