|
|
@ -1,7 +1,7 @@ |
|
|
|
import React, { useEffect, useState, useMemo } from 'react' |
|
|
|
import React, { useEffect, useState, useMemo } from 'react' |
|
|
|
import { Modal, ModalHeader, ModalBody, ModalFooter, Breadcrumb, BreadcrumbItem} from 'reactstrap'; |
|
|
|
import { Modal, ModalHeader, ModalBody, ModalFooter, Breadcrumb, BreadcrumbItem} from 'reactstrap'; |
|
|
|
import { Button } from 'reactstrap'; |
|
|
|
import { Button } from 'reactstrap'; |
|
|
|
import { Table, Tooltip } from 'antd'; |
|
|
|
import { Table, Tooltip, Spin } from 'antd'; |
|
|
|
import 'antd/dist/antd.css'; |
|
|
|
import 'antd/dist/antd.css'; |
|
|
|
import moment from 'moment'; |
|
|
|
import moment from 'moment'; |
|
|
|
import SweetAlert from 'react-bootstrap-sweetalert'; |
|
|
|
import SweetAlert from 'react-bootstrap-sweetalert'; |
|
|
@ -31,6 +31,7 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName |
|
|
|
const [humanResource, setHumanResource] = useState([]) |
|
|
|
const [humanResource, setHumanResource] = useState([]) |
|
|
|
const [dataEdit, setDataEdit] = useState([]) |
|
|
|
const [dataEdit, setDataEdit] = useState([]) |
|
|
|
const [typeDialog, setTypeDialog] = useState('') |
|
|
|
const [typeDialog, setTypeDialog] = useState('') |
|
|
|
|
|
|
|
const [loading, setLoading] = useState(true); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
if (openDialog && hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { |
|
|
|
if (openDialog && hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { |
|
|
@ -96,7 +97,9 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName |
|
|
|
return a.name_version.toLowerCase().localeCompare(b.name_version.toLowerCase()); |
|
|
|
return a.name_version.toLowerCase().localeCompare(b.name_version.toLowerCase()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
setDataGantt(sortedData); |
|
|
|
setDataGantt(sortedData); |
|
|
|
|
|
|
|
setLoading(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
setLoading(false); |
|
|
|
NotificationManager.error(`Data gantt project gagal terload silahkan coba lagi!`, 'Failed!!'); |
|
|
|
NotificationManager.error(`Data gantt project gagal terload silahkan coba lagi!`, 'Failed!!'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -254,7 +257,9 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName |
|
|
|
</ModalHeader> |
|
|
|
</ModalHeader> |
|
|
|
<ModalBody> |
|
|
|
<ModalBody> |
|
|
|
<div style={{ width: '100%', overflow: "auto" }}> |
|
|
|
<div style={{ width: '100%', overflow: "auto" }}> |
|
|
|
|
|
|
|
<Spin tip="Loading..." spinning={loading}> |
|
|
|
{RenderTable} |
|
|
|
{RenderTable} |
|
|
|
|
|
|
|
</Spin> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</ModalBody> |
|
|
|
</ModalBody> |
|
|
|
{/* <ModalFooter> |
|
|
|
{/* <ModalFooter> |
|
|
|