Browse Source

Merge branch 'staging' of https://git.oslog.id/ordo/adw-frontend into dev-wahyun

pull/2/head
wahyuun 1 year ago
parent
commit
78b48281ae
  1. 24
      src/views/Dashboard/DashboardProject.js
  2. 8
      src/views/SimproV2/CreatedProyek/index.js

24
src/views/Dashboard/DashboardProject.js

@ -268,7 +268,13 @@ const DashboardProject = () => {
const getProjectDetail = async () => {
setIsReadyProjectDetail(false);
const URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}`;
let URL = `${BASE_OSPRO}/api/project/detail/${PROJECT_ID}`;
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)
@ -298,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

8
src/views/SimproV2/CreatedProyek/index.js

@ -282,7 +282,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`
);
}
};
@ -558,7 +558,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`
);
}
};
@ -1490,12 +1490,16 @@ const CreatedProyek = ({ params, ...props }) => {
<span className="menu-text">Request Tools</span>
</div> */}
{/* <Link to={`/project-charter/${text.id}/gantt`}> */}
{
/*text.type_proyek_id != 9 ?*/
<div className="menu-list" onClick={() => handleOpenDialogGantt(text)}>
<span className="menu-icon">
<i className="fa fa-bars"></i>
</span>
<span className="menu-text">Gantt</span>
</div>
/*: null*/
}
<div className="menu-list" onClick={() => handleSCurve(text)}>
<span className="menu-icon">
<i className="fa fa-line-chart"></i>

Loading…
Cancel
Save