When the employee is in an inactive state, the Edit button will be disabled.
This commit is contained in:
parent
29c5d38bef
commit
d25c51db58
@ -85,18 +85,21 @@ const EmpBanner = ({ profile, loggedInUser }) => {
|
||||
</li>
|
||||
</ul>
|
||||
<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">
|
||||
<button
|
||||
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 && (
|
||||
{profile?.isActive && ( // ✅ show only if active
|
||||
<li className="list-inline-item">
|
||||
<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()}
|
||||
>
|
||||
Change Password
|
||||
|
Loading…
x
Reference in New Issue
Block a user