diff --git a/src/components/ProjectCashFlow/ProjectCashFlow.tsx b/src/components/ProjectCashFlow/ProjectCashFlow.tsx index 08129f6..2cc9c99 100644 --- a/src/components/ProjectCashFlow/ProjectCashFlow.tsx +++ b/src/components/ProjectCashFlow/ProjectCashFlow.tsx @@ -100,7 +100,14 @@ const ProjectCashFlow: React.FC = () => { const cashFlowProject = await fetchProjectsCashFlow(); setProjectData(cashFlowProject) setFilteredResult(cashFlowProject) + if (isInitializing && projectId) { + setProjectInfo(cashFlowProject.filter((result:any)=> { + // console.log("Checking ID:", result.id, projectId, String(projectId) === String(result.id)); + return String(projectId) === String(result.id) + })) + } } + const fetchChartData = async () => { const cashFlowMonthlyChartData = await fetchProjectsCashFlowMonthlyChart(selectedProjectIdList,cashFlowYear); console.log(cashFlowMonthlyChartData)