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

@@ -111,12 +111,12 @@ const IncidentStatsChart: React.FC<IncidentStatsChartProps> = ({ stats, loading
}
const monthlyData = buildMonthlyData(
stats.monthly,
stats.prev_year_monthly,
stats.monthly ?? [],
stats.prev_year_monthly ?? [],
stats.jahr
);
const pieData = stats.by_art.map((row) => ({
const pieData = (stats.by_art ?? []).map((row) => ({
name: EINSATZ_ART_LABELS[row.einsatz_art],
value: row.anzahl,
art: row.einsatz_art,