Update OKF docs bundle, README, and CLAUDE.md for today's features

Documents the shift planning and closure/payroll modules (new tables,
routes, stores), the dark redesign, and the docker-compose-broken-host
workaround. Adds CLAUDE.md pointing agents at docs/. Translates README to
English and keeps host-specific infrastructure details out of the repo.
This commit is contained in:
Michal Pemcak
2026-08-16 18:35:56 +02:00
parent f917ed06a8
commit 94933cac5c
19 changed files with 728 additions and 106 deletions

View File

@@ -1,5 +1,41 @@
# Update Log
## 2026-08-16
- **Creation**: Shift planning module — `shift_slots`/`shift_signups`
tables, weekly-template generation (lazy, idempotent, no cron), employee
signup/cancel with collision + capacity checks, admin calendar UI
(`MonthCalendar`, `ShiftPlanning`, `ShiftPlanManager`). Ported from
`gscript/ShiftPlanningService.js`, rewritten against this app's own data
model rather than copied.
- **Creation**: Month closure + payroll module — `pay_rates`,
`month_closures`, `payroll` tables; employee confirms the month, admin
locks/reopens/marks paid, tips/bonus/other adjustments, CSV export.
Collapses the source system's multi-role (ADMIN/MANAGER/ACCOUNTANT)
approval chain down to fit this app's single-admin reality. Ported from
`gscript/ClosureService.js` + `gscript/PayrollService.js`.
- **Fix**: A shift left open more than 12h (forgotten clock-out) is now
auto-closed at `clock_in + 12h`, checked lazily on read
(`attendance.ts`) — no admin action or scheduler needed.
- **Fix**: The first pay rate ever set for an employee now applies
retroactively to their whole history instead of defaulting to "today" —
caught live when an admin set a rate after the employee had already
worked hours that month.
- **Fix**: Locking a month closure with `saveDraftAdjustments` afterward
now correctly reports "already locked" instead of the misleading "not
confirmed yet" — the two guard conditions used to overlap.
- **Addition**: jest + ts-jest added to `backend/` (previously no test
runner); coverage for shift planning, closure/payroll, and the
forgotten-clock-out auto-close, each against a throwaway temp SQLite DB.
- **Update**: Full dark, sharp-edged redesign (`tui.css``theme.css`),
replacing the light monochrome TUI look with a dark modern SaaS style —
amber accent used sparingly, no rounded corners, no colored accent
borders. Every existing CSS class name kept, so no component logic
needed to change. See [Design system](./frontend/design-system.md).
- **Note**: `docker compose` on one of the deploy hosts is now broken even
for `up` (not just `ps`/`logs`/`down` as before) — redeploy there with
plain `docker run` instead; documented in
[Deployment](./architecture/deployment.md).
## 2026-08-12
- **Update**: Documented the actual production shipping workflow in
[Build & deployment](./architecture/deployment.md) — build locally for