From e799f351863e81cba64d10df73c8d71b4e73b213 Mon Sep 17 00:00:00 2001 From: "cyril.tsui" Date: Fri, 6 Dec 2024 13:15:54 +0800 Subject: [PATCH] update P&L --- .../GenerateProjectPandLReport.tsx | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx b/src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx index 6727078..df18646 100644 --- a/src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx +++ b/src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx @@ -19,7 +19,7 @@ interface Props { } interface SubComponents { - Loading: typeof GenerateProjectPandLReportLoading; + // Loading: typeof GenerateProjectPandLReportLoading; } @@ -43,16 +43,16 @@ const GenerateProjectPandLReport: React.FC & SubComponents = ({ projects [t], ); - const [loading, setLoading] = React.useState(false); + // const [loading, setLoading] = React.useState(false); return ( <> - {loading && } - {!loading && + {/* {loading && } */} + {/* {!loading && */} { - setLoading(true); + // setLoading(true); if (query.project && query.project !== "All") { if (query.project && query.startMonth && query.startMonthTo) { try { @@ -66,25 +66,26 @@ const GenerateProjectPandLReport: React.FC & SubComponents = ({ projects } } catch (error) { errorDialogWithContent(t("Download Fail"), t("Please try it later"), t) - .then(() => { - window.location.reload(); - }); + // .then(() => { + // window.location.reload(); + // }); } } else { errorDialogWithContent(t("Download Fail"), t("Please check the required field"), t) - .then(() => { - window.location.reload(); - }); + // .then(() => { + // window.location.reload(); + // }); } } - setLoading(false); + // setLoading(false); }} formType={"download"} - />} + /> + {/* } */} ); }; -GenerateProjectPandLReport.Loading = GenerateProjectPandLReportLoading; +// GenerateProjectPandLReport.Loading = GenerateProjectPandLReportLoading; export default GenerateProjectPandLReport; \ No newline at end of file