Fix duplicate const cur declaration in sync route

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-22 14:25:06 +00:00
parent 69720b778a
commit 109a4ea194

View file

@ -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)