|
|
|
@ -69,8 +69,31 @@ const ProjectType = ({ params, ...props }) => {
|
|
|
|
|
}, [dataExport]) |
|
|
|
|
|
|
|
|
|
const getListDivision = async () => { |
|
|
|
|
const payload = { |
|
|
|
|
columns: [], |
|
|
|
|
"orders": { |
|
|
|
|
"ascending": true, |
|
|
|
|
"columns": [ |
|
|
|
|
'name' |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
"paging": { |
|
|
|
|
"length": 0, |
|
|
|
|
"start": -1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (role_name !== "Super Admin") { |
|
|
|
|
payload.columns.push( |
|
|
|
|
{ "name": "company_id", "logic_operator": "=", "value": company_id, "operator": "AND" }, |
|
|
|
|
) |
|
|
|
|
} else { |
|
|
|
|
payload.columns.push( |
|
|
|
|
{ "name": "company_id", "logic_operator": "is null", "value": "", "operator": "AND" }, |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
const listDivions = await axios |
|
|
|
|
.get(DIVISI_LIST, HEADER) |
|
|
|
|
.post(DIVISI_SEARCH, payload, HEADER) |
|
|
|
|
.then(res => res) |
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
@ -321,6 +344,7 @@ const ProjectType = ({ params, ...props }) => {
|
|
|
|
|
clickOpenModal={clickOpenModal} |
|
|
|
|
dataParent={allDataMenu} |
|
|
|
|
dataDivisions={dataDivisions} |
|
|
|
|
company_id={company_id} |
|
|
|
|
/> |
|
|
|
|
<Card> |
|
|
|
|
<CardHeader style={{ display: "flex", justifyContent: "space-between" }}> |
|
|
|
|