new features
This commit is contained in:
@@ -5,12 +5,8 @@ import {
|
||||
Button,
|
||||
CircularProgress,
|
||||
Container,
|
||||
FormControl,
|
||||
Grid,
|
||||
InputLabel,
|
||||
MenuItem,
|
||||
Paper,
|
||||
Select,
|
||||
TextField,
|
||||
Typography,
|
||||
} from '@mui/material';
|
||||
@@ -19,8 +15,6 @@ import { useNavigate, useParams } from 'react-router-dom';
|
||||
import DashboardLayout from '../components/dashboard/DashboardLayout';
|
||||
import { vehiclesApi } from '../services/vehicles';
|
||||
import {
|
||||
FahrzeugStatus,
|
||||
FahrzeugStatusLabel,
|
||||
CreateFahrzeugPayload,
|
||||
UpdateFahrzeugPayload,
|
||||
} from '../types/vehicle.types';
|
||||
@@ -33,16 +27,14 @@ interface FormState {
|
||||
kurzname: string;
|
||||
amtliches_kennzeichen: string;
|
||||
fahrgestellnummer: string;
|
||||
baujahr: string; // kept as string for input, parsed on submit
|
||||
baujahr: string;
|
||||
hersteller: string;
|
||||
typ_schluessel: string;
|
||||
besatzung_soll: string;
|
||||
status: FahrzeugStatus;
|
||||
status_bemerkung: string;
|
||||
standort: string;
|
||||
bild_url: string;
|
||||
paragraph57a_faellig_am: string; // ISO date 'YYYY-MM-DD' or ''
|
||||
naechste_wartung_am: string; // ISO date 'YYYY-MM-DD' or ''
|
||||
paragraph57a_faellig_am: string;
|
||||
naechste_wartung_am: string;
|
||||
}
|
||||
|
||||
const EMPTY_FORM: FormState = {
|
||||
@@ -54,8 +46,6 @@ const EMPTY_FORM: FormState = {
|
||||
hersteller: '',
|
||||
typ_schluessel: '',
|
||||
besatzung_soll: '',
|
||||
status: FahrzeugStatus.Einsatzbereit,
|
||||
status_bemerkung: '',
|
||||
standort: 'Feuerwehrhaus',
|
||||
bild_url: '',
|
||||
paragraph57a_faellig_am: '',
|
||||
@@ -102,8 +92,6 @@ function FahrzeugForm() {
|
||||
hersteller: vehicle.hersteller ?? '',
|
||||
typ_schluessel: vehicle.typ_schluessel ?? '',
|
||||
besatzung_soll: vehicle.besatzung_soll ?? '',
|
||||
status: vehicle.status,
|
||||
status_bemerkung: vehicle.status_bemerkung ?? '',
|
||||
standort: vehicle.standort,
|
||||
bild_url: vehicle.bild_url ?? '',
|
||||
paragraph57a_faellig_am: toDateInput(vehicle.paragraph57a_faellig_am),
|
||||
|
||||
Reference in New Issue
Block a user