rework vehicle handling

This commit is contained in:
Matthias Hochmeister
2026-02-28 13:57:41 +01:00
parent 41fc41bee4
commit 1e478479be
12 changed files with 85 additions and 26 deletions

View File

@@ -35,9 +35,11 @@ import {
Edit,
Error as ErrorIcon,
LocalFireDepartment,
MoreHoriz,
PauseCircle,
ReportProblem,
School,
Verified,
Warning,
} from '@mui/icons-material';
import { useNavigate, useParams } from 'react-router-dom';
@@ -303,10 +305,9 @@ interface WartungTabProps {
}
const WARTUNG_ART_ICONS: Record<string, React.ReactElement> = {
Kraftstoff: <LocalFireDepartment color="action" />,
Reparatur: <Build color="warning" />,
Inspektion: <Assignment color="primary" />,
Hauptuntersuchung: <CheckCircle color="success" />,
'§57a Prüfung': <Verified color="success" />,
'Service': <Build color="warning" />,
'Sonstiges': <MoreHoriz color="action" />,
default: <Build color="action" />,
};
@@ -417,7 +418,7 @@ const WartungTab: React.FC<WartungTabProps> = ({ fahrzeugId, wartungslog, onAdde
onChange={(e) => setForm((f) => ({ ...f, art: (e.target.value || undefined) as WartungslogArt | undefined }))}
>
<MenuItem value=""> Bitte wählen </MenuItem>
{(['Inspektion', 'Reparatur', 'Kraftstoff', 'Reifenwechsel', 'Hauptuntersuchung', 'Reinigung', 'Sonstiges'] as WartungslogArt[]).map((a) => (
{(['§57a Prüfung', 'Service', 'Sonstiges'] as WartungslogArt[]).map((a) => (
<MenuItem key={a} value={a}>{a}</MenuItem>
))}
</Select>