Fix today gap + future date visual drop after pull timesheets
runRotaSync: only protect today's timesheet row when it has real clocked-out hours (hours > 0), so stale ?/0h rows and empty rows are healed by the next rota sync without needing manual intervention. runTimesheetSync: revert to SKIP for today when no completed shifts — writing an empty row was overwriting the rota schedule with nothing. Frontend: fetch wfShifts for the full week after a timesheet pull (not just up to today), so future rota rows aren't dropped from state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cbc9db67bc
commit
cae0f48d79
5 changed files with 24 additions and 17 deletions
|
|
@ -328,7 +328,8 @@ export function Planner() {
|
|||
setTimesheetSyncing(true)
|
||||
try {
|
||||
await syncTimesheets(start, end)
|
||||
const shifts = await getWorkforceShifts(start, end)
|
||||
const wsEnd = bookings.dates[bookings.dates.length - 1]
|
||||
const shifts = await getWorkforceShifts(start, wsEnd)
|
||||
setWfShifts(shifts)
|
||||
flash('Timesheets pulled from Workforce')
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue