|
|
|
@ -10,7 +10,7 @@ import { PROJECT_ROLE_ADD, PROJECT_ROLE_SEARCH, PROJECT_ROLE_EDIT, PROJECT_ROLE_
|
|
|
|
|
import { Pagination, Tooltip, Table } from 'antd'; |
|
|
|
|
import { withTranslation } from 'react-i18next'; |
|
|
|
|
const token = window.localStorage.getItem('token'); |
|
|
|
|
|
|
|
|
|
const company_id = localStorage.getItem("company_id") |
|
|
|
|
const BASE_URL = "http://siopas.co.id/custom-php/api/geohr/"; |
|
|
|
|
|
|
|
|
|
const config = { |
|
|
|
@ -60,6 +60,7 @@ class index extends Component {
|
|
|
|
|
tooltipTambah: false, |
|
|
|
|
totalPage: 0, |
|
|
|
|
typeDialog: 'Save', |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
this.columns = [ |
|
|
|
|
{ |
|
|
|
@ -108,7 +109,8 @@ class index extends Component {
|
|
|
|
|
const formData = { |
|
|
|
|
"paging": { "start": start, "length": this.state.rowsPerPage }, |
|
|
|
|
"columns": [ |
|
|
|
|
{ "name": "name", "logic_operator": "ilike", "value": this.state.search, "operator": "AND" } |
|
|
|
|
{ "name": "name", "logic_operator": "ilike", "value": this.state.search, "operator": "AND" }, |
|
|
|
|
{ "name": "company_id", "logic_operator": "=", "value": this.state.company_id, "operator": "AND" } |
|
|
|
|
], |
|
|
|
|
"joins": [], |
|
|
|
|
"orders": { "columns": ["id"], "ascending": false } |
|
|
|
@ -178,7 +180,8 @@ class index extends Component {
|
|
|
|
|
|
|
|
|
|
const formData = { |
|
|
|
|
name: data.name, |
|
|
|
|
description: data.description |
|
|
|
|
description: data.description, |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const result = await axios.post(PROJECT_ROLE_ADD, formData, config) |
|
|
|
@ -198,7 +201,8 @@ class index extends Component {
|
|
|
|
|
|
|
|
|
|
const formData = { |
|
|
|
|
name: data.name, |
|
|
|
|
description: data.description |
|
|
|
|
description: data.description, |
|
|
|
|
company_id |
|
|
|
|
} |
|
|
|
|
const url = PROJECT_ROLE_EDIT(data.id) |
|
|
|
|
const result = await axios.put(url, formData, config) |
|
|
|
|