|
|
@ -27,6 +27,7 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek |
|
|
|
|
|
|
|
|
|
|
|
const [id, setId] = useState(0) |
|
|
|
const [id, setId] = useState(0) |
|
|
|
const [parentId, setParentId] = useState(0) |
|
|
|
const [parentId, setParentId] = useState(0) |
|
|
|
|
|
|
|
const [parentName, setParentName] = useState(null) |
|
|
|
const [dataGantt, setDataGantt] = useState([]) |
|
|
|
const [dataGantt, setDataGantt] = useState([]) |
|
|
|
const [typeDialog, setTypeDialog] = useState("add") |
|
|
|
const [typeDialog, setTypeDialog] = useState("add") |
|
|
|
const [openDialogForm, setOpenDialogForm] = useState(false) |
|
|
|
const [openDialogForm, setOpenDialogForm] = useState(false) |
|
|
@ -98,8 +99,9 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek |
|
|
|
setOpenDialogFormGantt(true) |
|
|
|
setOpenDialogFormGantt(true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const handleViewGant = (id) => { |
|
|
|
const handleViewGant = (id, name) => { |
|
|
|
setParentId(id) |
|
|
|
setParentId(id) |
|
|
|
|
|
|
|
setParentName(name) |
|
|
|
setOpenDialogGantt(true) |
|
|
|
setOpenDialogGantt(true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -195,9 +197,9 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek |
|
|
|
<Tooltip title="Tambah Gantt"> |
|
|
|
<Tooltip title="Tambah Gantt"> |
|
|
|
<Button size={"sm"} color='primary' onClick={() => handleAddGant(text.id)}><i className="fa fa-gears"></i></Button> |
|
|
|
<Button size={"sm"} color='primary' onClick={() => handleAddGant(text.id)}><i className="fa fa-gears"></i></Button> |
|
|
|
</Tooltip>{" "} |
|
|
|
</Tooltip>{" "} |
|
|
|
{text.dataGantt && (<><Tooltip title="Detail Gantt"> |
|
|
|
{text.dataGantt && (<Tooltip title="Detail Gantt"> |
|
|
|
<Button size={"sm"} color='info' style={{ color: "#FFFFFF" }} onClick={() => handleViewGant(text.id)}><i className="fa fa-eye"></i></Button> |
|
|
|
<Button size={"sm"} color='info' onClick={() => handleViewGant(text.id, text.name)}><i className="fa fa-info"></i></Button> |
|
|
|
</Tooltip>{" "}</>)} |
|
|
|
</Tooltip>)} |
|
|
|
</> |
|
|
|
</> |
|
|
|
, |
|
|
|
, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -310,6 +312,7 @@ const DialogHierarchy = ({ openDialog, closeDialog, toggleDialog, idTask, proyek |
|
|
|
openDialog={openDialogGantt} |
|
|
|
openDialog={openDialogGantt} |
|
|
|
closeDialog={closeDialogGantt} |
|
|
|
closeDialog={closeDialogGantt} |
|
|
|
hierarchyId={parentId} |
|
|
|
hierarchyId={parentId} |
|
|
|
|
|
|
|
hierarchyName={parentName} |
|
|
|
idTask={idTask} |
|
|
|
idTask={idTask} |
|
|
|
/> |
|
|
|
/> |
|
|
|
<DialogFormGantt |
|
|
|
<DialogFormGantt |
|
|
|