forked from fahrPool/fahrPool
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 (
|
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| lib | ||
| public | ||
| .dockerignore | ||
| .env.local.example | ||
| .gitignore | ||
| Dockerfile | ||
| README.md | ||
| eslint.config.mjs | ||
| middleware.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||
README.md
web
See the root README.md for the full setup sequence — this is a
sub-directory of a larger self-hosted Supabase + Next.js project, not a
standalone create-next-app.