|
|
|
@ -8,6 +8,14 @@ import { DIVISI_LIST, DIVISI_ADD, DIVISI_EDIT, DIVISI_DELETE, DIVISI_SEARCH, COM
|
|
|
|
|
import { NotificationContainer, NotificationManager } from 'react-notifications'; |
|
|
|
|
import { Pagination, Button, Tooltip, Table, Spin } from 'antd'; |
|
|
|
|
import { useTranslation } from 'react-i18next'; |
|
|
|
|
import { useLocation } from "react-router-dom"; |
|
|
|
|
import { |
|
|
|
|
formatNumber, |
|
|
|
|
formatRupiah, |
|
|
|
|
formatThousand, |
|
|
|
|
renderFormatRupiah, |
|
|
|
|
checkActMenup, |
|
|
|
|
} from "../../../const/CustomFunc"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ProjectType = ({ params, ...props }) => { |
|
|
|
@ -24,7 +32,7 @@ const ProjectType = ({ params, ...props }) => {
|
|
|
|
|
hierarchy = props.hierarchy; |
|
|
|
|
user_name = props.user_name; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const location = useLocation(); |
|
|
|
|
const HEADER = { |
|
|
|
|
headers: { |
|
|
|
|
"Content-Type": "application/json", |
|
|
|
@ -400,13 +408,29 @@ const ProjectType = ({ params, ...props }) => {
|
|
|
|
|
render: (text, record) => |
|
|
|
|
<> |
|
|
|
|
<Tooltip title="Hapus"> |
|
|
|
|
<i id="TooltipDelete" className="fa fa-trash" style={{ color: 'red', marginRight: 10, cursor: "pointer" }} onClick={() => handleDelete(text.id)}></i> |
|
|
|
|
{ |
|
|
|
|
checkActMenup(location.pathname, 'delete') ? |
|
|
|
|
<i id="TooltipDelete" className="fa fa-trash" style={{ color: 'red', marginRight: 10, cursor: "pointer" }} onClick={() => handleDelete(text.id)}></i> |
|
|
|
|
: |
|
|
|
|
null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</Tooltip> |
|
|
|
|
<Tooltip title="Add"> |
|
|
|
|
<i id="TooltipEdit" className="cil-level-down fa-sm" style={{ color: 'blue', marginRight: 10, cursor: "pointer" }} onClick={() => handleAddChild(text)}></i> |
|
|
|
|
{ |
|
|
|
|
checkActMenup(location.pathname, 'create') ? |
|
|
|
|
<i id="TooltipEdit" className="cil-level-down fa-sm" style={{ color: 'blue', marginRight: 10, cursor: "pointer" }} onClick={() => handleAddChild(text)}></i> |
|
|
|
|
: |
|
|
|
|
null |
|
|
|
|
} |
|
|
|
|
</Tooltip> |
|
|
|
|
<Tooltip title="Edit"> |
|
|
|
|
<i id="TooltipEdit" className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => handleEdit(text)}></i> |
|
|
|
|
{ |
|
|
|
|
checkActMenup(location.pathname, 'update') ? |
|
|
|
|
<i id="TooltipEdit" className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => handleEdit(text)}></i> |
|
|
|
|
: |
|
|
|
|
null |
|
|
|
|
} |
|
|
|
|
</Tooltip> |
|
|
|
|
</> |
|
|
|
|
, |
|
|
|
@ -511,7 +535,12 @@ const ProjectType = ({ params, ...props }) => {
|
|
|
|
|
</Col> |
|
|
|
|
<Col> |
|
|
|
|
<Tooltip title={t('divisionAdd')}> |
|
|
|
|
{ |
|
|
|
|
checkActMenup(location.pathname, 'create') ? |
|
|
|
|
<Button style={{ background: "#4caf50", color: "#fff" }} onClick={() => handleOpenDialog('Save')}><i className="fa fa-plus"></i></Button> |
|
|
|
|
: |
|
|
|
|
null |
|
|
|
|
} |
|
|
|
|
</Tooltip> |
|
|
|
|
<Tooltip title={t('exportExcel')}> |
|
|
|
|
<Button style={{ marginLeft: "5px" }} onClick={() => handleExportExcel()}><i className="fa fa-print"></i></Button> |
|
|
|
|