Admin kann Nutzer anlegen, Rollen aendern und ueber die Supabase Admin
API sperren/entsperren -- RLS ist hier bewusst nicht die Grenze, die
Server-Action-Rollenpruefung ist es.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Page and CSV export now both render shift timestamps in Europe/Berlin
consistently (previously CSV used UTC, page used server-local time,
causing the same shift to show different clock times in each place).
Also adds a partial unique index so two near-simultaneous Kommen
requests for the same fahrer can no longer create two open shifts --
the existing app-layer check was check-then-act with no DB backstop.
Fields starting with =, +, -, @, tab, or CR are now neutralized with a
leading single quote before quoting, closing a CSV/spreadsheet formula
injection gap (CWE-1236) flagged by automated security review. Also
closes a bare-CR gap in the RFC 4180 escape trigger set.
INSERT policy now requires a fahrer's own shift to start open and
uncorrected (geht_um/korrigiert_von/korrigiert_am all null) — closes a
gap where a fahrer could forge a pre-corrected row. Also shortens a
policy name that exceeded Postgres' 63-byte identifier limit and was
being silently truncated.
Kommen/Gehen-Tabelle mit Column-Lockdown-Trigger, Pausenpauschale nach
§4 ArbZG, Aggregation, CSV-Export und Korrektur-Workflow in 9 Tasks.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Kommen/Gehen-Modul mit Pausenpauschale nach §4 ArbZG, Auswertung und
Korrekturmoeglichkeit durch Disponent/Admin.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Documents three frictions repeatedly hit this session: npm install
needed in the main repo after merging branches with new deps, manual
migration sync for the docker-compose master stack, and Edit/Write
worktree-isolation scope.
- KeyboardSensor zu useSensors ergänzt, damit Kanban-Karten auch per
Tastatur verschoben werden koennen (Design-Spec fordert Maus/Touch/
Tastatur-Bedienung).
- KanbanKarte erhaelt rolle-Prop; fuer rolle "readonly" werden
useDraggable-listeners/attributes nicht angewendet (disabled: true),
sodass keine Drag-Handles/Grab-Cursor angezeigt werden. Navigation zur
Detailseite bleibt unveraendert klickbar.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Also reconciles the worktree's stale CLAUDE.md snapshot with the
Design/Mobile-First section the user had added independently (uncommitted
in the main checkout) — this worktree branched before that edit landed.
Unrelated to the Kanban feature itself.
Three skills documenting non-obvious project conventions discovered
repeatedly during development (supabase-local-dev, curl-server-action,
rebuild-master-stack, the last one user-triggered only), plus a
PostToolUse hook that runs eslint --fix on edited web/*.ts(x) files
for fast feedback. Unrelated to the Kanban feature itself; bundled
into this branch because the harness's worktree isolation required
writing here rather than on master directly.
7 tasks: RLS policy for disponent-sees-fahrer-profiles (needed for the
assignment picker), pure drag-permission helper, Kanban query layer,
result-based server actions for the board context (deliberately not
reusing the redirect-based form actions), the KanbanBoard component
with @dnd-kit/core, the Fahrer-Auswaehler dialog, and wiring into the
dashboard page.
Replaces the Dashboard placeholder with an interactive Kanban board
(drag-and-drop via @dnd-kit/core, touch-capable per the mobile-first
requirement). Reuses existing RLS-driven visibility and the
uebernehmen()/stornieren() actions; adds one new server action
(zuweisenAnFahrer) for Disponent/Admin assigning orders to a specific
Fahrer, a gap that existed since the original Auftragsverwaltung scope.
Found by the final whole-branch review — two separate import
statements from the same module (accumulated across Tasks 4 and 5).
Cosmetic only, no behavior change.
Adds createFahrzeugUndAuswaehlen (unbound server action) so a new
Fahrzeug can be created inline from /auftraege/neu without leaving
the page, mirroring the existing Ort quick-add flow from Task 6.
Includes an app-layer admin/disponent role check as defense-in-depth
alongside RLS, consistent with the pattern already applied to
createOrtUndAuswaehlen and the page-level gate.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
7 tasks: validation helpers, query/mutation data layer, pgTAP RLS
coverage (a gap that predates this plan), Stammdaten page for Orte
and Fahrzeuge (list+create+edit), and inline quick-add for both on
the Auftrag-anlegen form. No schema/RLS changes - reuses existing
insert/update policies from the Auftragsverwaltung foundation.
Closes a gap found during the first live design-system test: no UI
existed to create new Abholorte/Zielorte/Fahrzeuge (only dropdowns of
existing entries). No schema change needed - RLS already supports
admin/disponent insert/update on orte/fahrzeuge. Covers a new
/stammdaten management page (list+create+edit) plus an inline
quick-add on the Auftrag-anlegen form.
The plain form-urlencoded curl POST in the manual verification steps
does not work against a real Next.js Server Action (found during Task
3's manual verification). Documents the correct multipart/$ACTION_ID
technique and the test admin credentials in Global Constraints so
later tasks don't rediscover this.