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 committed by Vikas Nale
parent e856220173
commit ba763f986d
2 changed files with 3 additions and 3 deletions

View File

@ -556,7 +556,7 @@ const EmployeeList = () => {
> >
<i className="bx bx-edit bx-sm"></i> Edit <i className="bx bx-edit bx-sm"></i> Edit
</Link> </Link>
<button {!item.isSystem && (<><button
className="dropdown-item py-1" className="dropdown-item py-1"
onClick={() => suspendEmployee(item.id)} onClick={() => suspendEmployee(item.id)}
> >
@ -572,7 +572,7 @@ const EmployeeList = () => {
> >
<i className="bx bx-cog bx-sm"></i> Manage <i className="bx bx-cog bx-sm"></i> Manage
Role Role
</button> </button></>)}
</div> </div>
</div> </div>
</td> </td>

View File

@ -15,7 +15,7 @@ export const RolesRepository = {
getEmployeeRoles:(id)=>api.get(`/api/employee/roles/${id}`), 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)
}; };