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.7 KiB
1.7 KiB
type, title, description, resource, tags, timestamp
| type | title | description | resource | tags | timestamp | |||
|---|---|---|---|---|---|---|---|---|
| SQLite Table | shift_signups | An employee's claim on a shift slot — approved or cancelled. | backend/src/db/index.ts |
|
2026-08-16T00:00:00Z |
shift_signups
Schema
| Column | Type | Description |
|---|---|---|
id |
INTEGER PK | autoincrement |
slot_id |
INTEGER | references shift_slots |
employee_id |
INTEGER | references employees |
status |
TEXT | approved | cancelled |
created_at |
TEXT | ISO 8601 UTC |
cancelled_at / cancelled_by |
TEXT | NULL | when, and by whom (admin email or the employee's own) |
Cancelling never deletes the row (status = 'cancelled'), so who was ever
signed up for a slot stays visible in history.
Signup rules
Enforced in signupInternal (backend/src/services/shiftPlanning.ts), in
this order, identically whether the employee signs themselves up or the
admin assigns them:
- Slot exists and isn't
closed. - Not already approved for this exact slot.
- No time overlap with any of the employee's other approved slots,
anywhere — not just the same day. Computed from real start/end
Dates (slotStart/slotEnd), so a slot whoseend_time <= start_timecorrectly counts as ending the next day. - Slot isn't already at capacity.
All of this runs synchronously in a single request — better-sqlite3 is
synchronous, so there's no LockService-style mutex needed the way the
source Apps Script version required
(signupEmployeeToSlot_ in gscript/ShiftPlanningService.js).