1
0
Fork 0
Commit Graph

9 Commits

Author SHA1 Message Date
Jonny 9d03c6d68d feat: Telefon/E-Mail in Standort-Formularen und -Tabelle
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCHRPWuV3bd37NJhW2NK6P
2026-08-19 12:39:15 +02:00
Jonny bcaa545aaa feat: Telefon/E-Mail in Standort-Server-Actions durchreichen 2026-08-19 12:30:40 +02:00
Jonny 116e78fdc6 feat: add inline Fahrzeug quick-add to Auftrag-anlegen page
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>
2026-07-07 09:39:38 +02:00
Jonny e55ab12c2b fix: add defense-in-depth role check to createOrtUndAuswaehlen 2026-07-07 09:13:29 +02:00
Jonny 69c22f9afe feat: add inline Ort quick-add to Auftrag-anlegen page 2026-07-07 08:47:42 +02:00
Jonny 06e115cc05 fix: resolve nested <main> landmarks, nav touch targets, focus consistency 2026-07-06 13:17:51 +02:00
Jonny ae78bcaab2 feat: restyle Auftrag-anlegen page 2026-07-06 12:49:29 +02:00
Jonny c758dd2305 fix: allow schaden photos during unterwegs and close final-review gaps
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>
2026-07-06 06:57:22 +02:00
Jonny e85e9ce993 feat: add auftrag creation page and server action 2026-07-05 17:49:48 +02:00