Browse Source

Merge branch 'staging' into dev-wahyun

pull/2/head
wahyun 1 year ago
parent
commit
0513c8ba10
  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 () => { const getProjectDetail = async () => {
setIsReadyProjectDetail(false); 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 const result = await axios
.get(URL, HEADER) .get(URL, HEADER)
.then((res) => res) .then((res) => res)
@ -298,10 +304,22 @@ const DashboardProject = () => {
result.data.data.company ? result.data.data.company : "-" result.data.data.company ? result.data.data.company : "-"
); );
setPlannedStart( 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( 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( setActualStart(
result.data.data.header?.start_date result.data.data.header?.start_date

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

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

Loading…
Cancel
Save