Browse Source

menu

pull/1/head
khaidralirahman 8 months ago
parent
commit
1e3560135c
  1. 13
      src/views/Master/MenuCompany/index.js

13
src/views/Master/MenuCompany/index.js

@ -10,6 +10,8 @@ import { MENU_ADD, MENU_SEARCH, MENU_EDIT, MENU_DELETE, MENU_LIST, MENU_COMPANY_
import { NotificationContainer, NotificationManager } from 'react-notifications';
import { Pagination, Tooltip, Table } from 'antd';
import { useTranslation } from 'react-i18next';
import { checkActMenup } from '../../../const/CustomFunc.js';
import { useLocation } from "react-router-dom";
const token = window.localStorage.getItem('token');
const column = [
{ name: "Nama" },
@ -34,6 +36,7 @@ const Index = ({ params, ...props }) => {
hierarchy = props.hierarchy;
user_name = props.user_name;
}
const location = useLocation()
const [alertDelete, setAlertDelete] = useState(false)
const [allDataMenu, setAllDataMenu] = useState([])
const [clickOpenModal, setClickOpenModal] = useState(false)
@ -340,10 +343,20 @@ const Index = ({ params, ...props }) => {
key: 'x',
render: (text, record) => <>
<Tooltip title={t('delete')}>
{
checkActMenup(location.pathname, 'delete') ?
<i id="TooltipDelete" className="fa fa-trash" style={{ color: 'red', marginRight: '10px', cursor: "pointer" }} onClick={() => handleDelete(text.id)}></i>
:
null
}
</Tooltip>
<Tooltip title={t('edit')}>
{
checkActMenup(location.pathname, 'update') ?
<i id="TooltipEdit" className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => handleEdit(text)}></i>
:
null
}
</Tooltip>
</>,
},

Loading…
Cancel
Save