From 109a4ea1940f46f7a02f1c4ed8e984bfb71ba3f1 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 22 Jul 2026 14:25:06 +0000 Subject: [PATCH] Fix duplicate const cur declaration in sync route Co-Authored-By: Claude Sonnet 4.6 --- backend/src/routes/workforce.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/routes/workforce.js b/backend/src/routes/workforce.js index d43d97f..8404e29 100644 --- a/backend/src/routes/workforce.js +++ b/backend/src/routes/workforce.js @@ -68,11 +68,11 @@ export async function workforceRoutes(app) { // Build a row for every date in the window (empty staff = no one scheduled) const dailyRows = [] - const cur = new Date(fromDate) - while (cur <= toDate) { - const d = fmtDate(cur) + const day = new Date(fromDate) + while (day <= toDate) { + const d = fmtDate(day) dailyRows.push({ date: d, staff: byDate[d] || [] }) - cur.setDate(cur.getDate() + 1) + day.setDate(day.getDate() + 1) } await upsertWorkforceShifts(dailyRows)