diff --git a/src/views/Master/MenuCompany/index.js b/src/views/Master/MenuCompany/index.js
index e3eb03b..e3e71a7 100644
--- a/src/views/Master/MenuCompany/index.js
+++ b/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) => <>
- handleDelete(text.id)}>
+ {
+ checkActMenup(location.pathname, 'delete') ?
+ handleDelete(text.id)}>
+ :
+ null
+ }
- handleEdit(text)}>
+ {
+ checkActMenup(location.pathname, 'update') ?
+ handleEdit(text)}>
+ :
+ null
+ }
>,
},