Browse Source

filter super admin

pull/2/head
farhan048 1 year ago
parent
commit
c2311a85e0
  1. 16
      src/views/SimproV2/ProjectType/index.js

16
src/views/SimproV2/ProjectType/index.js

@ -82,12 +82,6 @@ const ProjectType = ({ params }) => {
"logic_operator": "like",
"value": search,
"operator": "AND"
},
{
"name": "company_id",
"logic_operator": "like",
"value": company_id,
"operator": "AND"
}
],
"orders": {
@ -101,7 +95,15 @@ const ProjectType = ({ params }) => {
"start": start
}
}
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 result = await axios
.post(PROJECT_TYPE_SEARCH, payload, config, HEADER)
.then(res => res)

Loading…
Cancel
Save