"use client"; import type { CaseReport } from "@/lib/types"; import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, Legend, PieChart, Pie, Cell, } from "recharts"; import { FolderOpen, TrendingUp, TrendingDown } from "lucide-react"; const COLORS = [ "#171717", "#525252", "#a3a3a3", "#d4d4d4", "#737373", "#404040", "#e5e5e5", "#262626", ]; function formatMonth(period: string): string { const [year, month] = period.split("-"); const months = [ "Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", ]; return `${months[parseInt(month, 10) - 1]} ${year.slice(2)}`; } export function CasesTab({ data }: { data: CaseReport }) { const chartData = data.monthly.map((m) => ({ ...m, name: formatMonth(m.period), })); return (
{data.total.opened}
{data.total.closed}
{data.total.active}
Keine Daten im gewählten Zeitraum
) : (Keine Daten
) : (Keine Daten
) : (