1
0
Fork 0
fahrPool/web/components
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
..
dashboard fix: add keyboard drag support and hide drag handles for readonly role 2026-07-08 13:42:00 +02:00
fahrzeuge fix: use onSubmit instead of form action to prevent field reset on error, rename ActionResult type 2026-08-17 16:08:19 +02:00
standorte fix: use onSubmit instead of form action to prevent field reset on error, rename ActionResult type 2026-08-17 16:08:19 +02:00
ui fix: resolve nested <main> landmarks, nav touch targets, focus consistency 2026-07-06 13:17:51 +02:00
zeiterfassung feat: add Zeiterfassung page with Kommen/Gehen, Korrektur and CSV export 2026-07-14 09:03:57 +02:00
AuftragListe.tsx feat: add StatusBadge and restyle Aufträge list page 2026-07-06 12:20:50 +02:00
LogoutButton.tsx feat: add mobile drawer navigation and restyle header 2026-07-06 11:54:02 +02:00
MobileNav.tsx feat: add mobile drawer navigation and restyle header 2026-07-06 11:54:02 +02:00
NavLinks.tsx feat: split Stammdaten nav into Standorte and Fahrzeuge, remove old page 2026-08-17 15:32:51 +02:00