From 01591c429e8d500ec08388e3d7caf2d4bceec9e0 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Wed, 9 Jul 2025 16:37:09 +0530 Subject: [PATCH] added generic modal for edit profile --- src/pages/employee/EmployeeProfile.jsx | 29 ++++++-------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/src/pages/employee/EmployeeProfile.jsx b/src/pages/employee/EmployeeProfile.jsx index cc796a3c..3801fe9f 100644 --- a/src/pages/employee/EmployeeProfile.jsx +++ b/src/pages/employee/EmployeeProfile.jsx @@ -20,6 +20,7 @@ import Avatar from "../../components/common/Avatar"; import AttendancesEmployeeRecords from "./AttendancesEmployeeRecords"; import ManageEmployee from "../../components/Employee/ManageEmployee"; import { useChangePassword } from "../../components/Context/ChangePasswordContext"; +import GlobalModel from "../../components/common/GlobalModel"; const EmployeeProfile = () => { const { profile } = useProfile(); @@ -39,11 +40,7 @@ const EmployeeProfile = () => { setActivePill(pillKey); }; - const closeModal = () => { - setShowModal(false); - fetchEmployeeProfile(employeeId); - }; - const handleShow = () => setShowModal(true); + const fetchEmployeeProfile = async (employeeID) => { try { @@ -104,24 +101,10 @@ const EmployeeProfile = () => { const { openChangePassword } = useChangePassword(); return ( <> - {" "} {showModal && ( -
-
-
- -
-
-
+ setShowModal(false)}> + setShowModal(false)} /> + )}
{