From 52c8f5908da62d6b9dc15c1ec38de9df43c02258 Mon Sep 17 00:00:00 2001 From: farhantock Date: Wed, 6 Dec 2023 17:34:34 +0700 Subject: [PATCH 1/2] update filter dashboard --- src/views/Dashboard/DashboardBOD.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Dashboard/DashboardBOD.js b/src/views/Dashboard/DashboardBOD.js index f4935b7..e8acf92 100644 --- a/src/views/Dashboard/DashboardBOD.js +++ b/src/views/Dashboard/DashboardBOD.js @@ -127,7 +127,7 @@ const DashboardBOD = (props) => { } const getProjectPerScheduleHealth = async () => { - const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-schedule-health` + const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-schedule-health/${moment().format('YYYY')}/${company_id}/${all_project}/${hierarchy}` const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) const content = "Get Project by Schedule Health."; @@ -221,7 +221,7 @@ const DashboardBOD = (props) => { } const getProjectPerPhase = async () => { - const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-phase` + const URL = `${BASE_OSPRO}/api/dashboard/get-total-project-per-phase/${moment().format('YYYY')}/${company_id}/${all_project}/${hierarchy}` const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) const content = "Get Project by Phase."; From 40b933d631189a62f67f742b1271a145561040fa Mon Sep 17 00:00:00 2001 From: farhantock Date: Wed, 6 Dec 2023 17:34:58 +0700 Subject: [PATCH 2/2] check kondisi add or edit and false loading condition --- src/views/SimproV2/CreatedProyek/DialogFormProyek.js | 7 ++++--- src/views/SimproV2/CreatedProyek/index.js | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/DialogFormProyek.js b/src/views/SimproV2/CreatedProyek/DialogFormProyek.js index f504751..f871754 100644 --- a/src/views/SimproV2/CreatedProyek/DialogFormProyek.js +++ b/src/views/SimproV2/CreatedProyek/DialogFormProyek.js @@ -89,7 +89,7 @@ const DialogFormProyek = ({ const [lastIdxRisks, setLastIdxRisks] = useState(0); const [lastIdxMilestones, setLastIdxMilestones] = useState(0); const [lastIdxApproval, setLastIdxApproval] = useState(0); - const [loading, setLoading] = useState(true); + const [loading, setLoading] = useState(false); const handleGetdataIdproyek = async (id) => { setLoading(true) const result = await axios @@ -226,6 +226,7 @@ const DialogFormProyek = ({ setLastIdxMilestones(0); setLastIdxApproval(0); setStep(1); + setLoading(false) }; useEffect(() => { @@ -822,7 +823,7 @@ const DialogFormProyek = ({ > {dataDivisions.map((res) => ( ))} @@ -830,7 +831,7 @@ const DialogFormProyek = ({ - + { const handleOpenDialogProyek = async (id) => { setOpenDialogProyek(true); setidTask(id); - await getProjectImage(id); + if (id !== 0) { + await getProjectImage(id); + } }; const handleOpenDialogGantt = (data) => {