|
|
@ -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 |
|
|
|