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.
- 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>
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>
Brand tokens (colors, Inter font) extracted directly from widmannbewegt.de's
production CSS; logo SVG saved for later use. Covers layout/nav, reusable
UI primitives, and page-by-page application as a pure presentation-layer
sub-project on top of the existing Fundament and Auftragsverwaltung features.
Final whole-branch review before merging feature/auftragsverwaltung found
two Important and three Minor issues, all fixed in this round:
- auftrag_fotos and storage.objects INSERT policies now split the
condition: Pflicht-positions still require status = 'zugewiesen', but
schaden photos may additionally be uploaded while status = 'unterwegs',
matching the spec's "jederzeit waehrend der Fahrt nachtragen" requirement.
- Added schadenFotoNachtragen server action + a page form so drivers can
actually use the new mid-trip upload window.
- Added supabase/tests/auftrag_fotos_rls_test.sql (12 pgTAP tests) covering
SELECT/INSERT RLS on both auftrag_fotos and storage.objects, including the
new unterwegs-schaden-allowed / unterwegs-pflicht-blocked cases.
- fahrtBeginnen now checks affected row count like fahrtBeenden/stornieren
instead of only checking `error`.
- /auftraege/neu now gates on role (admin/disponent) via loadProfile(),
redirecting non-privileged roles back to /auftraege with a visible error
(which now renders the error query param).
- Renamed the over-long storage INSERT policy name to stay under the 63
byte Postgres identifier limit.
Migrations were edited in place rather than layered with a new migration,
following the established precedent (55c4ac5) for pre-merge, not-yet-deployed
RLS fixes on this branch.
Verified: npx supabase db reset clean, npx supabase test db 33/33 passing
(was 21), npm run build and npm test green in web/, and a live rolled-back
SQL probe confirming a driver can insert a schaden photo but not a Pflicht
photo while status = 'unterwegs'.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>