Commit graph

9 commits

Author SHA1 Message Date
18e24efbeb Add sync error logging, extend error flash, fix unload saves
- Log workforce sync errors to backend stdout so they appear in docker logs
- Extend error flash from 5s to 15s so errors are readable
- Replace sendBeacon (POST-only) with keepalive fetch (PUT) on unload —
  sendBeacon was hitting 404s on all three unload saves

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 14:19:38 +00:00
872251250e Fix logout (add missing nginx auth proxy) + show name/email in sidebar footer
The /hk-planner/api/auth/ → central auth nginx block was missing, causing
logout to hit the app backend. Also corrects the logout URL and switches from
window.location.href='/' to reload(). Shows name + email in sidebar footer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-22 11:10:02 +00:00
e0b0f2f275 Fix shift hours overcounting automatic breaks + add version-check banner
Workforce's automatic_break_length is a payroll deduction setting, not a
scheduling field — applying it when no explicit breaks are present was silently
shortening all shifts (e.g. a 2h shift showing as 1.5h). Now only deducts
explicit break records from s.breaks. Also adds BUILD_VERSION to /health and
an UpdateBanner that prompts staff to reload when a new deploy lands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 15:30:17 +00:00
ba23d59b3d Force desktop frame via useFrameViewport hook in Layout — applies to all pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:05:30 +00:00
2c0180ce9a Sync shared components — sidebar scrollbar, Layout, AuthGate updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 12:07:11 +00:00
e0ff800c6b Add shared device inactivity timeout to AuthGate 2026-07-13 11:53:04 +00:00
c0b1d2a62e Move general tasks + time reqs to Settings; add date adjustments
- Rename 'Category Settings' to 'Settings' (nav, page title, component)
- Move Recurring General Tasks and Time Requirements editing to Settings page
- Planner still loads both for calcRequired calculations
- Add date-specific Adjustments section to Planner: per-date +/- hour
  offsets keyed by YYYY-MM-DD (non-recurring); feed into Required Hours total
- Adjustments row shown in Required Hours tfoot when non-zero

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 21:11:21 +00:00
135f1f6cf0 Add CalendarClock icon, planner/settings capabilities
- backend/src/auth.js: extract caps from JWT (planner/settings), hasCap/requireCap
- backend/src/routes/config.js: gate categories + test-connection on requireCap('settings')
- frontend/src/types.ts: add caps[] to User, export can() helper
- frontend/src/App.tsx: gate /settings route on can(user, 'settings')
- frontend/src/components/Layout.tsx: gate nav item on can(user, 'settings')

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 14:29:58 +00:00
4abae5eda1 Initial commit: HK Planner app
Housekeeping workload and hours planning app — port of the WP hotel
housekeeping hours calculator plugin. 7-day occupancy planner with
Newbook PMS integration, staff rota, time requirements, and pickup tracking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 09:24:14 +00:00