fix: hide Fallgruppen with 0 entries from pie chart

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
CCS Admin 2026-02-26 20:42:03 +00:00
parent 8038c6e50d
commit a2b8d476b2

View file

@ -33,7 +33,9 @@ export function DashboardPage() {
const { data, isLoading: loading } = useDashboard(jahr) const { data, isLoading: loading } = useDashboard(jahr)
const fallgruppenData = data const fallgruppenData = data
? Object.entries(data.kpis.fallgruppen).map(([key, value]) => ({ ? Object.entries(data.kpis.fallgruppen)
.filter(([, value]) => value > 0)
.map(([key, value]) => ({
name: FALLGRUPPEN_LABELS[key] || key, name: FALLGRUPPEN_LABELS[key] || key,
value, value,
})) }))