Procházet zdrojové kódy

Merge branch 'main' of https://git.2fi-solutions.com/wayne.lee/tsms

tags/Baseline_180220205_Frontend
MSI\2Fi před 8 měsíci
rodič
revize
ced8a29fb1
1 změnil soubory, kde provedl 15 přidání a 14 odebrání
  1. +15
    -14
      src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx

+ 15
- 14
src/components/GenerateProjectPandLReport/GenerateProjectPandLReport.tsx Zobrazit soubor

@@ -19,7 +19,7 @@ interface Props {
}

interface SubComponents {
Loading: typeof GenerateProjectPandLReportLoading;
// Loading: typeof GenerateProjectPandLReportLoading;
}


@@ -43,16 +43,16 @@ const GenerateProjectPandLReport: React.FC<Props> & SubComponents = ({ projects
[t],
);

const [loading, setLoading] = React.useState(false);
// const [loading, setLoading] = React.useState(false);

return (
<>
{loading && <GenerateProjectPandLReport.Loading />}
{!loading &&
{/* {loading && <GenerateProjectPandLReport.Loading />} */}
{/* {!loading && */}
<SearchBox
criteria={searchCriteria}
onSearch={async (query) => {
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<Props> & 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;

Načítá se…
Zrušit
Uložit