Browse Source

fix schedule dashboard project

pull/1/head
wahyu 1 year ago
parent
commit
4c9cafb264
  1. 19
      src/views/Dashboard/DashboardProject.js
  2. 4
      src/views/SimproV2/CreatedProyek/index.js

19
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

4
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`
);
}
};

Loading…
Cancel
Save