1
0
Fork 0
Commit Graph

178 Commits

Author SHA1 Message Date
Jonny 9406ab31d7 feat: show Foto-Galerie on Auftrag detail page 2026-08-18 13:41:16 +02:00
Jonny 3e544be8ce fix: add pointer-events-auto to lightbox image so clicking the photo does not close it 2026-08-18 13:08:52 +02:00
Jonny 97ac267158 feat: add FotoGalerie component with thumbnail grid and lightbox 2026-08-18 13:00:18 +02:00
Jonny 0a0b0b3112 feat: add loadAuftragFotos query with sort/label logic and signed-URL origin rewrite
- Add fotos.ts: loadAuftragFotos query function and sortiereUndBeschrifteFotos utility
- Add fotos.test.ts: 6 unit tests for sorting/labeling logic
- Update vitest.config.ts: add path alias resolution for @/ imports
2026-08-18 12:49:44 +02:00
Jonny a2254ae539 docs: add Auftrag-Foto-Galerie implementation plan 2026-08-18 12:25:18 +02:00
Jonny 61a306a121 docs: add Auftrag-Foto-Galerie design spec 2026-08-18 12:02:36 +02:00
Jonny eb0fad8c16 fix: remove encType from Server-Action forms to fix upload error
React 19 forbids setting encType/method on a <form> whose action is a
function - it manages FormData (including files) itself. The extra
attribute triggered a console error and blocked "Fahrt beginnen" /
"Schadensfoto nachtragen" whenever photos were attached.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCHRPWuV3bd37NJhW2NK6P
2026-08-18 11:27:33 +02:00
Jonny 930994126f feat: switch Nutzerverwaltung page to inline-editable table 2026-08-17 18:03:26 +02:00
Jonny d261061c1c fix: render Sperren button within a single row Card instead of a duplicate row 2026-08-17 17:36:43 +02:00
Jonny a85b79bb05 fix: make Sperren/Entsperren reachable during edit mode in NutzerZeile 2026-08-17 17:28:11 +02:00
Jonny d023bb49fe feat: add NutzerZeile and NutzerTabelle components 2026-08-17 17:19:33 +02:00
Jonny 50083ab8eb feat: replace aendereRolle with return-based aktualisiereNutzer, convert sperren/entsperren to return-based 2026-08-17 17:11:51 +02:00
Jonny bef98d1898 feat: add validateNutzerBearbeiten and export GUELTIGE_ROLLEN 2026-08-17 17:05:44 +02:00
Jonny 525c460a74 docs: add Nutzerverwaltung-Tabelle implementation plan 2026-08-17 16:49:52 +02:00
Jonny 3885fa5bea docs: add Nutzerverwaltung-Tabelle design spec 2026-08-17 16:41:10 +02:00
Jonny 6677679eb9 fix: use onSubmit instead of form action to prevent field reset on error, rename ActionResult type
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.
2026-08-17 16:08:19 +02:00
Jonny c8be1c0c00 feat: split Stammdaten nav into Standorte and Fahrzeuge, remove old page
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
2026-08-17 15:32:51 +02:00
Jonny 16b0300488 feat: add Fahrzeuge page with inline-editable table
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 15:12:00 +02:00
Jonny f8d466ccbf feat: add Fahrzeuge server actions (return-based, no redirect) 2026-08-17 15:07:51 +02:00
Jonny a33a18e6fa feat: add Standorte page with inline-editable table
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HCHRPWuV3bd37NJhW2NK6P
2026-08-17 15:02:17 +02:00
Jonny 587e36f81c feat: add Standorte server actions (return-based, no redirect) 2026-08-17 14:56:49 +02:00
Jonny ca942958c0 docs: add Standorte/Fahrzeuge-Tabellen implementation plan 2026-08-17 14:47:23 +02:00
Jonny b15f36e528 docs: add Standorte/Fahrzeuge-Tabellen design spec 2026-08-17 14:37:34 +02:00
Jonny b70c1511f1 docs: add Login-per-Benutzername implementation plan 2026-07-16 08:29:19 +02:00
Jonny 6b4e53d46f docs: add Login-per-Benutzername design spec 2026-07-15 22:46:16 +02:00
Jonny 8ed4c86813 feat: add Nutzerverwaltung page 2026-07-15 11:43:26 +02:00
Jonny 3f78e4f65a feat: add Nutzerverwaltung server actions (erstellen, rolle aendern, sperren, entsperren) 2026-07-15 10:54:08 +02:00
Jonny 02c9274c13 fix: paginate auth.admin.listUsers() in Nutzerliste query 2026-07-15 10:42:24 +02:00
Jonny 3013a7d52c feat: add Nutzerliste query (merges profiles with auth.admin.listUsers) 2026-07-14 22:08:04 +02:00
Jonny 371312fc89 test: add exact 8-character password boundary case 2026-07-14 22:04:32 +02:00
Jonny 147f601e34 feat: add validation for Nutzer-Erstellen, Rolle and Selbstschutz 2026-07-14 22:00:27 +02:00
Jonny 8db31c72a8 feat: add Supabase admin client and service-role-key wiring 2026-07-14 21:56:15 +02:00
Jonny 5ad147088c docs: add Nutzerverwaltung implementation plan
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>
2026-07-14 18:48:55 +02:00
Jonny cffd576451 docs: add Nutzerverwaltung design spec
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>
2026-07-14 18:35:24 +02:00
Jonny 90ed4d764f fix: unify Zeiterfassung timezone display and add DB guard against double clock-in
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.
2026-07-14 10:27:50 +02:00
Jonny d87e881d0e feat: add Zeiterfassung link to navigation 2026-07-14 09:11:39 +02:00
Jonny 02dfc2b23e feat: add Zeiterfassung page with Kommen/Gehen, Korrektur and CSV export 2026-07-14 09:03:57 +02:00
Jonny c3cdfc9ac7 feat: add Zeiterfassung server actions (kommen, gehen, korrigieren, csv export) 2026-07-14 08:51:53 +02:00
Jonny d8ccdc85ca feat: add Zeiterfassung query helpers (Schichten, offene Schichten, verknuepfte Auftraege) 2026-07-14 08:45:27 +02:00
Jonny b1da32ae7a test: add bare-CR quoting case for CSV export 2026-07-13 17:11:44 +02:00
Jonny 45612501df fix: harden CSV export against formula injection and CR row corruption
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.
2026-07-13 17:02:07 +02:00
Jonny 9f2b2d292e feat: add CSV export helper for Zeiterfassung 2026-07-13 16:57:21 +02:00
Jonny b8a7509363 feat: add Tages-/Wochensummen aggregation for Zeiterfassung 2026-07-13 16:51:40 +02:00
Jonny 070b1287c1 test: add invalid-date case for validateSchichtKorrektur 2026-07-13 16:48:51 +02:00
Jonny d91765bd69 feat: add validation for Schicht-Korrektur (geht_um after kommt_um) 2026-07-13 16:44:30 +02:00
Jonny 3fe33c5e0f feat: add pure pause/netto time calculation per §4 ArbZG 2026-07-13 16:31:35 +02:00
Jonny b49314e67f fix: close arbeitszeiten INSERT audit-trail gap and policy name length
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.
2026-07-13 16:24:53 +02:00
Jonny 8d76230f02 feat: add arbeitszeiten table with RLS and fahrer column-lockdown trigger 2026-07-13 16:11:38 +02:00
Jonny cd6fa14551 docs: add Zeiterfassung implementation plan
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>
2026-07-13 15:53:20 +02:00
Jonny 50b511fe9c docs: add Zeiterfassung design spec
Kommen/Gehen-Modul mit Pausenpauschale nach §4 ArbZG, Auswertung und
Korrekturmoeglichkeit durch Disponent/Admin.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 15:39:01 +02:00