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