Browse Source

fix gantt state

pull/2/head
Wahyu Ramadhan 1 year ago
parent
commit
cd9384729a
  1. 9
      src/views/SimproV2/CreatedProyek/DialogGantt.js

9
src/views/SimproV2/CreatedProyek/DialogGantt.js

@ -31,18 +31,13 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName
const [humanResource, setHumanResource] = useState([]) const [humanResource, setHumanResource] = useState([])
useEffect(() => { useEffect(() => {
if (hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { if (openDialog && hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) {
getdataGantt(); getdataGantt();
} }
}, [hierarchyId, idTask, openDialog])
useEffect(() => {
if (!openDialog) { if (!openDialog) {
setDataGantt([]); setDataGantt([]);
} else {
} }
}, [openDialog]) }, [hierarchyId, idTask, openDialog])
const getDataHumanResource = async () => { const getDataHumanResource = async () => {
const result = await axios const result = await axios

Loading…
Cancel
Save