diff --git a/src/views/SimproV2/CreatedProyek/DIalogHierarchy.js b/src/views/SimproV2/CreatedProyek/DIalogHierarchy.js
index 27a43b9..f82aa87 100644
--- a/src/views/SimproV2/CreatedProyek/DIalogHierarchy.js
+++ b/src/views/SimproV2/CreatedProyek/DIalogHierarchy.js
@@ -11,6 +11,7 @@ import { NotificationContainer, NotificationManager } from 'react-notifications'
import DialogUserGantt from './DialogUserGantt';
import DialogForm from './DIalogFormHierarchy'
import DialogFormGantt from './DialogFormGantt';
+import DialogGantt from './DialogGantt';
import { useTranslation } from 'react-i18next';
import { async } from '@dabeng/react-orgchart';
import { Link } from 'react-router-dom';
@@ -29,6 +30,7 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
const [dataGantt, setDataGantt] = useState([])
const [typeDialog, setTypeDialog] = useState("add")
const [openDialogForm, setOpenDialogForm] = useState(false)
+ const [openDialogGantt, setOpenDialogGantt] = useState(false)
const [openDialogFormGantt, setOpenDialogFormGantt] = useState(false)
const [openDialogUserGantt, setOpenDialogUserGantt] = useState(false)
const [dataHierarchy, setDataHierarchy] = useState([])
@@ -41,7 +43,7 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
if (idTask > 0) {
getdataHierarchy();
}
- }, [idTask, openDialog, closeDialog])
+ }, [saveHierarchy, idTask, openDialog, closeDialog])
useEffect(() => {
getDataHumanResource();
@@ -96,6 +98,11 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
setOpenDialogFormGantt(true)
}
+ const handleViewGant = (id) => {
+ setParentId(id)
+ setOpenDialogGantt(true)
+ }
+
const toggleDialogFormGantt = () => {
setOpenDialogFormGantt(!openDialogFormGantt)
}
@@ -138,11 +145,6 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek
const getdataHierarchy = async () => {
-
- const payload = {
- "columns": [{ "name": "project_id", "logic_operator": "=", "value": idTask, "operator": "AND" }],
- "joins": [{ "name": "m_version_gantt", "column_join": "hierarchy_ftth_id", "column_results": "progress" }],
- }
const url = HIERARCHY_FTTH_TREE(idTask)
const result = await axios
.get(url, HEADER)
@@ -186,9 +188,12 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek