mirror of
https://github.com/complexcaresolutions/dak.c2s.git
synced 2026-03-17 19:33:41 +00:00
fix: hide Fallgruppen with 0 entries from pie chart
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8038c6e50d
commit
a2b8d476b2
1 changed files with 6 additions and 4 deletions
|
|
@ -33,10 +33,12 @@ export function DashboardPage() {
|
|||
const { data, isLoading: loading } = useDashboard(jahr)
|
||||
|
||||
const fallgruppenData = data
|
||||
? Object.entries(data.kpis.fallgruppen).map(([key, value]) => ({
|
||||
name: FALLGRUPPEN_LABELS[key] || key,
|
||||
value,
|
||||
}))
|
||||
? Object.entries(data.kpis.fallgruppen)
|
||||
.filter(([, value]) => value > 0)
|
||||
.map(([key, value]) => ({
|
||||
name: FALLGRUPPEN_LABELS[key] || key,
|
||||
value,
|
||||
}))
|
||||
: []
|
||||
|
||||
const years = Array.from({ length: 5 }, (_, i) => currentYear - i)
|
||||
|
|
|
|||
Loading…
Reference in a new issue