diff --git a/src/views/SimproV2/CreatedProyek/DialogGantt.js b/src/views/SimproV2/CreatedProyek/DialogGantt.js index 0f72d16..9d2f776 100644 --- a/src/views/SimproV2/CreatedProyek/DialogGantt.js +++ b/src/views/SimproV2/CreatedProyek/DialogGantt.js @@ -31,18 +31,13 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName const [humanResource, setHumanResource] = useState([]) useEffect(() => { - if (hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { + if (openDialog && hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { getdataGantt(); } - }, [hierarchyId, idTask, openDialog]) - - useEffect(() => { if (!openDialog) { setDataGantt([]); - } else { - } - }, [openDialog]) + }, [hierarchyId, idTask, openDialog]) const getDataHumanResource = async () => { const result = await axios