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.
1.4 KiB
1.4 KiB
type, title, description, resource, tags, timestamp
| type | title | description | resource | tags | timestamp | ||
|---|---|---|---|---|---|---|---|
| API Endpoint | Shift planning routes (employee) | GET /api/shifts/available, GET /api/shifts/mine, POST/DELETE /api/shifts/:slotId/signup. | backend/src/routes/shifts.ts |
|
2026-08-16T00:00:00Z |
Shift planning routes (employee)
Mounted at /api/shifts. Every route requires requireAuth +
requireEmployee.
Examples
GET /api/shifts/available?period=YYYY-MM
200 -> { "slots": AvailableSlot[] }
Open slots the employee isn't already signed up for. period defaults to
the current month if omitted/invalid. Also the trigger point for lazily
generating that month's template — see
shift_slots.
GET /api/shifts/mine?period=YYYY-MM
200 -> { "slots": MySlot[] }
POST /api/shifts/:slotId/signup
201 -> { "ok": true }
400 -> collision with another approved slot, already full, already signed
up, or the slot is closed — see [shift_signups](/docs/data-model/shift-signups.md)
DELETE /api/shifts/:slotId/signup
204 on success
400 -> not signed up for that slot
Related
- shift_slots, shift_signups
- Admin routes — the admin-side calendar, manual assignment, and month generation
- Frontend stores —
shiftPlanningStore