From 9290a0b2d0e114040e472e9264be4f09cf740f05 Mon Sep 17 00:00:00 2001 From: Egutierrez Date: Fri, 8 May 2026 00:38:32 +0200 Subject: [PATCH] chore: auto-commit (1 archivos) - frontend/src/components/Dashboard.tsx Co-Authored-By: Claude Opus 4.7 (1M context) --- frontend/src/components/Dashboard.tsx | 82 ++++++++++++++++++++------- 1 file changed, 62 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/Dashboard.tsx b/frontend/src/components/Dashboard.tsx index a63eeee..58b2273 100644 --- a/frontend/src/components/Dashboard.tsx +++ b/frontend/src/components/Dashboard.tsx @@ -1,5 +1,15 @@ -import { AreaChart, BarChart, LineChart } from "@mantine/charts"; +import { BarChart, LineChart } from "@mantine/charts"; import "@mantine/charts/styles.css"; +import { + Area, + AreaChart as RAreaChart, + CartesianGrid, + Legend, + ResponsiveContainer, + Tooltip, + XAxis, + YAxis, +} from "recharts"; import { Badge, Box, @@ -120,8 +130,13 @@ export function Dashboard({ users }: Props) { if (!data) return []; const arr = data.cumulative_flow; const firstIdx = arr.findIndex((p) => p.total > 0 || p.done > 0); - if (firstIdx <= 0) return arr; - return arr.slice(Math.max(0, firstIdx - 1)); + const sliced = firstIdx <= 0 ? arr : arr.slice(Math.max(0, firstIdx - 1)); + return sliced.map((p) => ({ + date: p.date, + done: p.done, + wip: Math.max(0, p.total - p.done), + total: p.total, + })); }, [data]); const throughputSeries = useMemo(() => { @@ -277,23 +292,50 @@ export function Dashboard({ users }: Props) { Sin datos. ) : ( - +
+ + + + + + + + + + + +
)}