|
|
@ -10,6 +10,7 @@ import { NotificationContainer, NotificationManager } from 'react-notifications' |
|
|
|
import { Pagination, Tooltip, Table } from 'antd'; |
|
|
|
import { Pagination, Tooltip, Table } from 'antd'; |
|
|
|
import { ROLE_ADD, ROLE_SEARCH, ROLE_EDIT, ROLE_DELETE, ROLEMENU_ADD, ROLEMENU_SEARCH, ROLEMENU_DELETE_ROLE } from '../../../const/ApiConst.js'; |
|
|
|
import { ROLE_ADD, ROLE_SEARCH, ROLE_EDIT, ROLE_DELETE, ROLEMENU_ADD, ROLEMENU_SEARCH, ROLEMENU_DELETE_ROLE } from '../../../const/ApiConst.js'; |
|
|
|
import { withTranslation } from 'react-i18next'; |
|
|
|
import { withTranslation } from 'react-i18next'; |
|
|
|
|
|
|
|
import { checkActMenup } from '../../../const/CustomFunc'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const LENGTH_DATA = 10 |
|
|
|
const LENGTH_DATA = 10 |
|
|
@ -66,15 +67,30 @@ class index extends Component { |
|
|
|
className: 'nowrap', |
|
|
|
className: 'nowrap', |
|
|
|
render: (text, record) => <> |
|
|
|
render: (text, record) => <> |
|
|
|
<Tooltip title={this.props.t('menuRoles')}> |
|
|
|
<Tooltip title={this.props.t('menuRoles')}> |
|
|
|
<i className="cil-menu" style={{ color: 'green', marginRight: 10, cursor: "pointer" }} onClick={() => this.handleMenuRoles(text.id)}></i> |
|
|
|
{ |
|
|
|
|
|
|
|
checkActMenup('/roles', 'update') ? |
|
|
|
|
|
|
|
<i className="cil-menu fa-lg" style={{ color: 'green', marginRight: 10, cursor: "pointer" }} onClick={() => this.handleMenuRoles(text.id)}></i> |
|
|
|
|
|
|
|
: |
|
|
|
|
|
|
|
null |
|
|
|
|
|
|
|
} |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
|
|
|
|
|
|
|
|
<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('/roles', '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('/roles', 'update') ? |
|
|
|
|
|
|
|
<i className="fa fa-edit" style={{ color: 'green', cursor: "pointer" }} onClick={() => this.handleEdit(text)}></i> |
|
|
|
|
|
|
|
: |
|
|
|
|
|
|
|
null |
|
|
|
|
|
|
|
} |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
</>, |
|
|
|
</>, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -503,10 +519,17 @@ 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> |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
|