Fix: Verschleißteil-Formular Datumsvalidierung und Schriftfarbe

- installDate Schema akzeptiert jetzt YYYY-MM-DD Format (HTML date input)
- maintenanceHistorySchema date akzeptiert jetzt YYYY-MM-DD Format
- Transform konvertiert Datumsstrings automatisch zu Date-Objekten
- API-Routes verwenden validierte Date-Objekte direkt
- Alle Formularfelder haben jetzt schwarze Schriftfarbe (text-black)
- Optional-Felder werden getrimmt (brand, model, notes)
This commit is contained in:
Denis Urs Rudolph
2025-12-05 22:30:45 +01:00
parent 5663fec6a6
commit 81edc206e0
6 changed files with 65 additions and 27 deletions

View File

@@ -48,7 +48,7 @@ export async function POST(
type: validatedData.type,
brand: validatedData.brand,
model: validatedData.model,
installDate: new Date(validatedData.installDate),
installDate: validatedData.installDate,
installMileage: validatedData.installMileage,
serviceInterval: validatedData.serviceInterval,
status: validatedData.status,