From db82be4e8c4ea87aade8426594a362a7db39bf12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Ben=C3=ADtez?= Date: Tue, 23 Jun 2026 18:47:35 +0000 Subject: [PATCH] =?UTF-8?q?fix(lint):=20ReportPage.tsx=20=E2=80=94=20useMe?= =?UTF-8?q?mo=20dep=20simulation=20en=20lugar=20de=20simulation=3F.result?= =?UTF-8?q?=20+=20eslint-disable=20intencional=20en=20useEffect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/report/ReportPage.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/features/report/ReportPage.tsx b/src/features/report/ReportPage.tsx index 9b6d8b5..85884ef 100644 --- a/src/features/report/ReportPage.tsx +++ b/src/features/report/ReportPage.tsx @@ -40,8 +40,11 @@ export function ReportPage() { const { lastPersistedExecutedAt, loadLatestForProcess } = useSimulationStore() // Cargar executedAt persistido si el usuario llega directo al reporte (sin pasar por workspace) + // Intencional: dep [process?.id] — solo re-ejecutar cuando cambia el proceso, no en cada + // re-render por cambios de nombre/cliente/etc. del objeto process. useEffect(() => { if (process) loadLatestForProcess(process.id) + // eslint-disable-next-line react-hooks/exhaustive-deps }, [process?.id, loadLatestForProcess]) // Set de bpmnElementIds marcados como automatizables — debe estar antes de los early returns @@ -70,7 +73,7 @@ export function ReportPage() { return Object.fromEntries( simulation.result.perActivity.map((a) => [a.activityId, a.resourceCostBreakdown]) ) - }, [simulation?.result]) + }, [simulation]) // Estado y refs para el tab "Actual" const [selectedIdActual, setSelectedIdActual] = useState(null)