Refactor employee action dropdown for better accessibility and code clarity #3
@ -372,49 +372,33 @@ const EmployeeList = () =>
|
|||||||
Active
|
Active
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td className={`d-flex justify-content-end justify-content-sm-center ${!ManageEmployee && 'd-none'} `}>
|
{ManageEmployee && (
|
||||||
<div className="d-flex align-items-center ">
|
<td className="text-end">
|
||||||
<a
|
<div className="dropdown">
|
||||||
className={`btn btn-icon dropdown-toggle hide-arrow`}
|
<button className="btn btn-icon dropdown-toggle hide-arrow" data-bs-toggle="dropdown">
|
||||||
data-bs-toggle="dropdown"
|
<i className="bx bx-dots-vertical-rounded bx-md"></i>
|
||||||
>
|
</button>
|
||||||
<i className="bx bx-dots-vertical-rounded bx-md"></i>
|
<div className="dropdown-menu dropdown-menu-end">
|
||||||
</a>
|
<button onClick={() => navigate(`/employee/${item.id}`)} className="dropdown-item">
|
||||||
|
View
|
||||||
<div className="dropdown-menu dropdown-menu-end m-0">
|
</button>
|
||||||
{" "}
|
<Link to={`/employee/manage/${item.id}`} className="dropdown-item">
|
||||||
<a
|
Edit
|
||||||
|
</Link>
|
||||||
onClick={()=> navigate(`/employee/${item.id}`)}
|
<button className="dropdown-item">Suspend</button>
|
||||||
className="dropdown-item"
|
<button
|
||||||
>
|
className="dropdown-item"
|
||||||
View
|
type="button"
|
||||||
</a>
|
data-bs-toggle="modal"
|
||||||
|
data-bs-target="#managerole-modal"
|
||||||
<Link
|
onClick={() => handleConfigData(item.id)}
|
||||||
className={`dropdown-item `}
|
>
|
||||||
to={`/employee/manage/${item.id}`}
|
Manage Role
|
||||||
>
|
</button>
|
||||||
Edit
|
</div>
|
||||||
</Link>
|
|
||||||
|
|
||||||
<a className="dropdown-item">
|
|
||||||
Suspend
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
className="dropdown-item"
|
|
||||||
type="button"
|
|
||||||
data-bs-toggle="modal"
|
|
||||||
data-bs-target="#managerole-modal"
|
|
||||||
onClick={() => {
|
|
||||||
handleConfigData(item.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Manage Role
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</td>
|
||||||
</td>
|
)}
|
||||||
</tr>
|
</tr>
|
||||||
) )}
|
) )}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user