Browse Source

UOM

pull/1/head
khaidralirahman 10 months ago
parent
commit
03fd2fe6f2
  1. 25
      src/views/SimproV2/Satuan/index.js

25
src/views/SimproV2/Satuan/index.js

@ -8,6 +8,14 @@ import { NotificationContainer, NotificationManager } from 'react-notifications'
import { Pagination, Button, Tooltip } from 'antd';
import { SATUAN_ADD, SATUAN_EDIT, SATUAN_DELETE, SATUAN_SEARCH, COMPANY_MANAGEMENT_LIST } from '../../../const/ApiConst';
import { useTranslation } from 'react-i18next';
import { useLocation } from "react-router-dom";
import {
formatNumber,
formatRupiah,
formatThousand,
renderFormatRupiah,
checkActMenup,
} from "../../../const/CustomFunc";
const Satuan = ({ params, ...props }) => {
@ -24,7 +32,7 @@ const Satuan = ({ params, ...props }) => {
hierarchy = props.hierarchy;
user_name = props.user_name;
}
const location = useLocation();
const HEADER = {
headers: {
"Content-Type": "application/json",
@ -352,7 +360,12 @@ const Satuan = ({ params, ...props }) => {
</Col>
<Col>
<Tooltip title={t('uomAdd')}>
{
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" }} color="primary" onClick={() => handleExportExcel()}><i className="fa fa-print"></i></Button>
@ -380,11 +393,21 @@ const Satuan = ({ params, ...props }) => {
<td className='nowrap'>
<Tooltip title={t('delete')}>
{
checkActMenup(location.pathname, 'delete') ?
<i id="TooltipDelete" className="fa fa-trash" style={{ color: 'red', marginRight: 10, cursor: "pointer" }} onClick={() => handleDelete(n.id)}></i>
:
null
}
</Tooltip>
<Tooltip title={t('ubah')}>
{
checkActMenup(location.pathname, 'update') ?
<i id="TooltipEdit" className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => handleEdit(n)}></i>
:
null
}
</Tooltip>
</td>
{role_name === 'Super Admin' &&

Loading…
Cancel
Save