|
|
|
@ -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 { Pagination, Tooltip, Table } from 'antd'; |
|
|
|
|
import { withTranslation } from 'react-i18next'; |
|
|
|
|
import { checkActMenup } from '../../../const/CustomFunc'; |
|
|
|
|
const LENGTH_DATA = 10 |
|
|
|
|
class index extends Component { |
|
|
|
|
constructor(props) { |
|
|
|
@ -63,10 +64,20 @@ class index extends Component {
|
|
|
|
|
className: 'nowrap', |
|
|
|
|
render: (text, record) => <> |
|
|
|
|
<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 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> |
|
|
|
|
</>, |
|
|
|
|
}, |
|
|
|
@ -403,7 +414,13 @@ class index extends Component {
|
|
|
|
|
</Col> |
|
|
|
|
<Col> |
|
|
|
|
<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 title={this.props.t('exportExcel')}> |
|
|
|
|
<Button style={{ marginLeft: "5px" }} id="TooltipExport" color="primary" onClick={() => this.handleExportExcel()}><i className="fa fa-print"></i></Button> |
|
|
|
|