Browse Source

project role

pull/1/head
khaidralirahman 8 months ago
parent
commit
08428e7d69
  1. 23
      src/views/Master/RoleProject/index.js

23
src/views/Master/RoleProject/index.js

@ -9,6 +9,7 @@ import { NotificationContainer, NotificationManager } from 'react-notifications'
import { PROJECT_ROLE_ADD, PROJECT_ROLE_SEARCH, PROJECT_ROLE_EDIT, PROJECT_ROLE_DELETE } from '../../../const/ApiConst.js'; import { PROJECT_ROLE_ADD, PROJECT_ROLE_SEARCH, PROJECT_ROLE_EDIT, PROJECT_ROLE_DELETE } from '../../../const/ApiConst.js';
import { Pagination, Tooltip, Table } from 'antd'; import { Pagination, Tooltip, Table } from 'antd';
import { withTranslation } from 'react-i18next'; import { withTranslation } from 'react-i18next';
import { checkActMenup } from '../../../const/CustomFunc';
const LENGTH_DATA = 10 const LENGTH_DATA = 10
class index extends Component { class index extends Component {
constructor(props) { constructor(props) {
@ -63,10 +64,20 @@ class index extends Component {
className: 'nowrap', className: 'nowrap',
render: (text, record) => <> render: (text, record) => <>
<Tooltip title={this.props.t('delete')}> <Tooltip title={this.props.t('delete')}>
<i className="fa fa-trash" style={{ color: 'red', marginRight: 10, cursor: "pointer" }} onClick={() => this.handleDelete(text.id)}></i> {
checkActMenup('/project-role', 'delete') ?
<i className="fa fa-trash" style={{ color: 'red', marginRight: 10, cursor: "pointer" }} onClick={() => this.handleDelete(text.id)}></i>
:
null
}
</Tooltip> </Tooltip>
<Tooltip title={this.props.t('edit')}> <Tooltip title={this.props.t('edit')}>
<i className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => this.handleEdit(text)}></i> {
checkActMenup('/project-role', 'update') ?
<i className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => this.handleEdit(text)}></i>
:
null
}
</Tooltip> </Tooltip>
</>, </>,
}, },
@ -403,7 +414,13 @@ class index extends Component {
</Col> </Col>
<Col> <Col>
<Tooltip title={this.props.t('rolesAdd')}> <Tooltip title={this.props.t('rolesAdd')}>
<Button id="TooltipTambah" color="success" onClick={() => this.handleOpenDialog('Save')}><i className="fa fa-plus"></i></Button> {
checkActMenup('/roles', 'create') ?
<Button Button id="TooltipTambah" color="success" onClick={() => this.handleOpenDialog('Save')}><i className="fa fa-plus"></i>
</Button>
:
null
}
</Tooltip> </Tooltip>
<Tooltip title={this.props.t('exportExcel')}> <Tooltip title={this.props.t('exportExcel')}>
<Button style={{ marginLeft: "5px" }} id="TooltipExport" color="primary" onClick={() => this.handleExportExcel()}><i className="fa fa-print"></i></Button> <Button style={{ marginLeft: "5px" }} id="TooltipExport" color="primary" onClick={() => this.handleExportExcel()}><i className="fa fa-print"></i></Button>

Loading…
Cancel
Save