diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index c0ebe00..cabac62 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -272,6 +272,9 @@ const DashboardProject = () => { if (GANTT_ID) { URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}/${GANTT_ID}`; } + if (SCURVE) { + URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}/${GANTT_ID}/${SCURVE}`; + } const result = await axios .get(URL, HEADER) .then((res) => res) @@ -301,10 +304,22 @@ const DashboardProject = () => { result.data.data.company ? result.data.data.company : "-" ); setPlannedStart( - result.data.data?.mulai_proyek ? result.data.data.mulai_proyek : null + SCURVE + ? result.data.data.mulai_proyek + ? result.data.data.mulai_proyek + : null + : result.data.data.header?.planned_start + ? result.data.data.header?.planned_start + : null ); setPlannedFinish( - result.data.data?.akhir_proyek ? result.data.data.akhir_proyek : null + SCURVE + ? result.data.data.akhir_proyek + ? result.data.data.akhir_proyek + : null + : result.data.data.header?.planned_end + ? result.data.data.header?.planned_end + : null ); setActualStart( result.data.data.header?.start_date diff --git a/src/views/SimproV2/CreatedProyek/index.js b/src/views/SimproV2/CreatedProyek/index.js index 76b1086..bbe638a 100644 --- a/src/views/SimproV2/CreatedProyek/index.js +++ b/src/views/SimproV2/CreatedProyek/index.js @@ -252,7 +252,7 @@ const CreatedProyek = ({ params, ...props }) => { return; } else if (result.status == 200 && result.data.data) { history.push( - `dashboard-customer/${text.id}/${result.data.gantt.last_gantt_id}/1` + `dashboard-customer/${text.id}/${result.data.gantt}/1` ); } }; @@ -520,7 +520,7 @@ const CreatedProyek = ({ params, ...props }) => { return; } else if (result.status == 200 && result.data.data) { history.push( - `/dashboard-project/${id}/${result.data.gantt.last_gantt_id}/1` + `/dashboard-project/${id}/${result.data.gantt}/1` ); } };