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)