Added logic to the employee list to hide the 'Manage Role' and 'Suspend' buttons for system-defined employees
This commit is contained in:
parent
505c9a46db
commit
a521c76fe6
@ -557,7 +557,7 @@ const EmployeeList = () => {
|
||||
>
|
||||
<i className="bx bx-edit bx-sm"></i> Edit
|
||||
</Link>
|
||||
<button
|
||||
{!item.isSystem && (<><button
|
||||
className="dropdown-item py-1"
|
||||
onClick={() => suspendEmployee(item.id)}
|
||||
>
|
||||
@ -573,7 +573,7 @@ const EmployeeList = () => {
|
||||
>
|
||||
<i className="bx bx-cog bx-sm"></i> Manage
|
||||
Role
|
||||
</button>
|
||||
</button></>)}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -15,7 +15,7 @@ export const RolesRepository = {
|
||||
|
||||
|
||||
getEmployeeRoles:(id)=>api.get(`/api/employee/roles/${id}`),
|
||||
createEmployeeRoles:(data)=>api.post("/api/employee/roles",data)
|
||||
createEmployeeRoles:(data)=>api.post("/api/roles/assign-roles",data)
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user