Finding 1: React 19's native <form action={fn}> resets uncontrolled
fields once fn resolves without throwing, regardless of an app-level
{success:false} result. Since handleSubmit never throws, every failed
submit (e.g. duplicate Kennzeichen) silently wiped user edits. Switched
all four Standorte/Fahrzeuge inline-edit and create forms to a plain
onSubmit handler that calls event.preventDefault() and builds FormData
from the submitted element manually, sidestepping React's action-reset
machinery.
Finding 2: web/app/standorte/actions.ts and web/app/fahrzeuge/actions.ts
each declared their own MutationResult type shadowing the differently
shaped MutationResult exported from lib/orte-fahrzeuge/mutations.ts.
Renamed the local type to ActionResult in both files to remove the
name collision.
Task 5 of the standorte-fahrzeuge-tabellen plan: point the nav at the
new /standorte and /fahrzeuge routes built in tasks 1-4, and remove the
now-dead old combined /stammdaten page and its now-unreferenced
loadOrt/loadFahrzeug query helpers.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCHRPWuV3bd37NJhW2NK6P
Admin-Client mit Service-Role-Key, Validierung, Nutzerliste-Merge aus
profiles + auth.admin.listUsers, vier Server Actions und die Seite in
6 Tasks.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.