Added logic to the employee list to hide the 'Manage Role' and 'Suspend' buttons for system-defined employees

This commit is contained in:
ashutosh.nehete 2025-05-08 15:29:27 +05:30
parent 505c9a46db
commit a521c76fe6
2 changed files with 3 additions and 3 deletions

View File

@ -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>

View File

@ -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)
};