Adding Change Password button on Employee Profile Page.
This commit is contained in:
parent
c2c9fd01fc
commit
a480c3b111
@ -17,6 +17,8 @@ import { useNavigate } from "react-router-dom";
|
|||||||
import Avatar from "../../components/common/Avatar";
|
import Avatar from "../../components/common/Avatar";
|
||||||
import AttendancesEmployeeRecords from "./AttendancesEmployeeRecords";
|
import AttendancesEmployeeRecords from "./AttendancesEmployeeRecords";
|
||||||
import ManageEmployee from "../../components/Employee/ManageEmployee";
|
import ManageEmployee from "../../components/Employee/ManageEmployee";
|
||||||
|
import { useChangePassword } from "../../components/Context/ChangePasswordContext";
|
||||||
|
|
||||||
const EmployeeProfile = () => {
|
const EmployeeProfile = () => {
|
||||||
const projectID = useSelector((store) => store.localVariables.projectId);
|
const projectID = useSelector((store) => store.localVariables.projectId);
|
||||||
const { employeeId } = useParams();
|
const { employeeId } = useParams();
|
||||||
@ -95,7 +97,7 @@ const EmployeeProfile = () => {
|
|||||||
if (loading) {
|
if (loading) {
|
||||||
return <div>Loading...</div>;
|
return <div>Loading...</div>;
|
||||||
}
|
}
|
||||||
|
const { openChangePassword } = useChangePassword();
|
||||||
return (
|
return (
|
||||||
<> {showModal && (<div
|
<> {showModal && (<div
|
||||||
className={`modal fade ${showModal ? "show" : ""} `}
|
className={`modal fade ${showModal ? "show" : ""} `}
|
||||||
@ -239,12 +241,19 @@ const EmployeeProfile = () => {
|
|||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
className="btn btn-primary btn-block"
|
className="btn btn-primary btn-block"
|
||||||
onClick={() =>
|
onClick={() => handleShow()}
|
||||||
handleShow()
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Edit Profile
|
Edit Profile
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="btn btn-outline-primary btn-block mt-2"
|
||||||
|
onClick={() => openChangePassword()}
|
||||||
|
>
|
||||||
|
Change Password
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user