From 13ab6e1f66594ba3b8c58c90956b651e72135681 Mon Sep 17 00:00:00 2001 From: "cyril.tsui" Date: Sat, 8 Nov 2025 19:38:12 +0800 Subject: [PATCH] Fix Dashboard --- src/components/ProjectCashFlow/ProjectCashFlow.tsx | 7 +++++++ 1 file changed, 7 insertions(+) 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)