|
|
@ -25,7 +25,8 @@ const config = { |
|
|
|
"Content-type": `application/json` |
|
|
|
"Content-type": `application/json` |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const role_name = window.localStorage.getItem('role_name'); |
|
|
|
|
|
|
|
const company_id = window.localStorage.getItem('company_id'); |
|
|
|
const ResourceWorker = ({ params }) => { |
|
|
|
const ResourceWorker = ({ params }) => { |
|
|
|
const token = localStorage.getItem("token") |
|
|
|
const token = localStorage.getItem("token") |
|
|
|
const company_id = localStorage.getItem("company_id") |
|
|
|
const company_id = localStorage.getItem("company_id") |
|
|
@ -172,11 +173,6 @@ const ResourceWorker = ({ params }) => { |
|
|
|
"logic_operator": "~*", |
|
|
|
"logic_operator": "~*", |
|
|
|
"value": search |
|
|
|
"value": search |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
|
|
|
|
"name": "company_id", |
|
|
|
|
|
|
|
"logic_operator": "=", |
|
|
|
|
|
|
|
"value": company_id |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
"joins": [ |
|
|
|
"joins": [ |
|
|
@ -204,6 +200,16 @@ const ResourceWorker = ({ params }) => { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (role_name !== "Super Admin") { |
|
|
|
|
|
|
|
payload.group_column.where.push( |
|
|
|
|
|
|
|
{ "name": "company_id", "logic_operator": "=", "value": company_id, "operator": "AND" }, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
payload.group_column.where.push( |
|
|
|
|
|
|
|
{ "name": "company_id", "logic_operator": "is null", "value": "", "operator": "AND" }, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const result = await axios |
|
|
|
const result = await axios |
|
|
|
.post(USER_SEARCH, payload, config) |
|
|
|
.post(USER_SEARCH, payload, config) |
|
|
|
.then(res => res) |
|
|
|
.then(res => res) |
|
|
|