When the employee is in an inactive state, the Edit button will be disabled.
This commit is contained in:
parent
9dddba4e30
commit
c4ff56fb8d
@ -85,18 +85,21 @@ const EmpBanner = ({ profile, loggedInUser }) => {
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul className="list-inline mb-0 d-flex align-items-center flex-wrap justify-content-sm-start justify-content-center mt-4">
|
<ul className="list-inline mb-0 d-flex align-items-center flex-wrap justify-content-sm-start justify-content-center mt-4">
|
||||||
<li className="list-inline-item">
|
{profile?.isActive && ( // ✅ show only if active
|
||||||
<button
|
<li className="list-inline-item">
|
||||||
className="btn btn-sm btn-primary btn-block"
|
|
||||||
onClick={() => setShowModal(true)}
|
|
||||||
>
|
|
||||||
Edit Profile
|
|
||||||
</button>
|
|
||||||
</li>
|
|
||||||
<li className="list-inline-item">
|
|
||||||
{profile?.id == loggedInUser?.employeeInfo?.id && (
|
|
||||||
<button
|
<button
|
||||||
className="btn btn-sm btn-outline-primary btn-block"
|
className="btn btn-sm btn-primary btn-block"
|
||||||
|
onClick={() => setShowModal(true)}
|
||||||
|
>
|
||||||
|
Edit Profile
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<li className="list-inline-item">
|
||||||
|
{profile?.id === loggedInUser?.employeeInfo?.id && (
|
||||||
|
<button
|
||||||
|
className="btn btn-sm btn-outline-primary btn-block"
|
||||||
onClick={() => openChangePassword()}
|
onClick={() => openChangePassword()}
|
||||||
>
|
>
|
||||||
Change Password
|
Change Password
|
||||||
|
Loading…
x
Reference in New Issue
Block a user