|
|
@ -135,15 +135,31 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
const pageName = params.name; |
|
|
|
const pageName = params.name; |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
// getDataUserResource()
|
|
|
|
if (openDialogMaterial) { |
|
|
|
getDataMaterialResource(); |
|
|
|
getDataMaterialResource(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [openDialogMaterial]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (openDialogTools) { |
|
|
|
getDataToolsResource(); |
|
|
|
getDataToolsResource(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [openDialogTools]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (openDialogAssignK3) { |
|
|
|
|
|
|
|
getDataK3(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, [openDialogAssignK3]); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
if (openDialogProyek) { |
|
|
|
handleGetTipeProject(); |
|
|
|
handleGetTipeProject(); |
|
|
|
handleGetPhaseProject(); |
|
|
|
handleGetPhaseProject(); |
|
|
|
handleGetDivisions(); |
|
|
|
handleGetDivisions(); |
|
|
|
handleGetDataPm(); |
|
|
|
handleGetDataPm(); |
|
|
|
getDataK3(); |
|
|
|
} |
|
|
|
}, []); |
|
|
|
}, [openDialogProyek]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
getDataProyek(); |
|
|
|
getDataProyek(); |
|
|
@ -307,32 +323,6 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const getdataHierarchy = async (idTask) => { |
|
|
|
|
|
|
|
setLoadHierarchy(true); |
|
|
|
|
|
|
|
const payload = { |
|
|
|
|
|
|
|
columns: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "project_id", |
|
|
|
|
|
|
|
logic_operator: "=", |
|
|
|
|
|
|
|
value: idTask, |
|
|
|
|
|
|
|
operator: "AND", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
const result = await axios |
|
|
|
|
|
|
|
.post(HIERARCHY_FTTH_SEARCH, payload, HEADER) |
|
|
|
|
|
|
|
.then((res) => res) |
|
|
|
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
if (result && result.status == 200) { |
|
|
|
|
|
|
|
setDataHierarchy(result.data.data); |
|
|
|
|
|
|
|
setLoadHierarchy(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
NotificationManager.error( |
|
|
|
|
|
|
|
`Data gantt project gagal terload silahkan coba lagi!`, |
|
|
|
|
|
|
|
"Failed!!" |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
const getDataToolsResource = async () => { |
|
|
|
const getDataToolsResource = async () => { |
|
|
|
const result = await axios |
|
|
|
const result = await axios |
|
|
|
.get(TOOLS_RESOURCE_LIST, HEADER) |
|
|
|
.get(TOOLS_RESOURCE_LIST, HEADER) |
|
|
@ -843,8 +833,27 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
["Project Name", "Budget", "Project Type", "PM", "Time Project"], |
|
|
|
["Project Name", "Budget", "Project Type", "PM", "Time Project"], |
|
|
|
]; |
|
|
|
]; |
|
|
|
const payload = { |
|
|
|
const payload = { |
|
|
|
paging: { start: 0, length: -1 }, |
|
|
|
columns: [ |
|
|
|
joins: [], |
|
|
|
{ |
|
|
|
|
|
|
|
name: "nama", |
|
|
|
|
|
|
|
logic_operator: "ilike", |
|
|
|
|
|
|
|
value: search, |
|
|
|
|
|
|
|
operator: "AND", |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
joins: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "m_users", |
|
|
|
|
|
|
|
column_join: "pm_id", |
|
|
|
|
|
|
|
column_results: ["name", "username"], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "m_type_proyek", |
|
|
|
|
|
|
|
column_join: "type_proyek_id", |
|
|
|
|
|
|
|
column_results: ["name", "description"], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// { "name": "subproyeks.m_subproyek", "column_join": "parent_id", "column_results": ["nama", "biaya", "color_progress", "jumlah_pekerja", "pic", "mulai_proyek", "akhir_proyek", "biaya_actual", "persentase_progress_plan", "persentase_progress_actual"] }
|
|
|
|
|
|
|
|
], |
|
|
|
orders: { columns: ["id"], ascending: false }, |
|
|
|
orders: { columns: ["id"], ascending: false }, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -1084,7 +1093,6 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
{ |
|
|
|
{ |
|
|
|
text.type_proyek_id == 9 ? |
|
|
|
text.type_proyek_id == 9 ? |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
onClick={() => getdataHierarchy(text.id)} |
|
|
|
|
|
|
|
size="small" |
|
|
|
size="small" |
|
|
|
type="link" |
|
|
|
type="link" |
|
|
|
style={{ color: "green" }} |
|
|
|
style={{ color: "green" }} |
|
|
@ -1210,7 +1218,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
dataPM={dataPm} |
|
|
|
dataPM={dataPm} |
|
|
|
/> |
|
|
|
/> |
|
|
|
), |
|
|
|
), |
|
|
|
[openDialogProyek] |
|
|
|
[openDialogProyek, dataPm, dataDivisions, dataPhaseProject, dataTypeProyek, idTask] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const RenderDialogFormMaterial = useMemo( |
|
|
|
const RenderDialogFormMaterial = useMemo( |
|
|
@ -1226,7 +1234,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
proyekName={proyekName} |
|
|
|
proyekName={proyekName} |
|
|
|
/> |
|
|
|
/> |
|
|
|
), |
|
|
|
), |
|
|
|
[openDialogMaterial] |
|
|
|
[openDialogMaterial, proyekName, materialResource, materialProyek, userProyek, idTask] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const RenderDialogTableTools = useMemo( |
|
|
|
const RenderDialogTableTools = useMemo( |
|
|
@ -1241,7 +1249,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
proyekName={proyekName} |
|
|
|
proyekName={proyekName} |
|
|
|
/> |
|
|
|
/> |
|
|
|
), |
|
|
|
), |
|
|
|
[openDialogTools] |
|
|
|
[openDialogTools, proyekName, userProyek, toolsResource, idTask] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// DialogAsignHr
|
|
|
|
// DialogAsignHr
|
|
|
@ -1276,7 +1284,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
dataK3={dataK3} |
|
|
|
dataK3={dataK3} |
|
|
|
/> |
|
|
|
/> |
|
|
|
), |
|
|
|
), |
|
|
|
[openDialogAssignK3] |
|
|
|
[openDialogAssignK3, dataK3] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const RenderDialogDoc = useMemo( |
|
|
|
const RenderDialogDoc = useMemo( |
|
|
|