From 2e3ca120f752ae73ba42884f0404a0fd7e5efc82 Mon Sep 17 00:00:00 2001 From: harsh12-99 Date: Thu, 11 Jan 2024 13:09:18 +0530 Subject: [PATCH 1/2] showing correct profile info --- src/containers/UserManagement/EditProfile.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/UserManagement/EditProfile.jsx b/src/containers/UserManagement/EditProfile.jsx index c2116ba3..32dc409a 100644 --- a/src/containers/UserManagement/EditProfile.jsx +++ b/src/containers/UserManagement/EditProfile.jsx @@ -145,7 +145,7 @@ const EditProfile = () => { const langObj = new FetchSupportedLanguagesAPI("TRANSLATION"); dispatch(APITransport(langObj)); // eslint-disable-next-line - }, []); + }, [id]); useEffect(() => { if (userData?.email && userData?.role) { From 349da64f76f190115ef20cdd0772d666293543b0 Mon Sep 17 00:00:00 2001 From: harsh12-99 Date: Thu, 11 Jan 2024 13:09:34 +0530 Subject: [PATCH 2/2] showing correct profile info --- src/containers/UserManagement/EditProfile.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/containers/UserManagement/EditProfile.jsx b/src/containers/UserManagement/EditProfile.jsx index 32dc409a..6baae5e0 100644 --- a/src/containers/UserManagement/EditProfile.jsx +++ b/src/containers/UserManagement/EditProfile.jsx @@ -250,7 +250,11 @@ const EditProfile = () => { const { id: userId, role } = loggedInUserData; if (userId === +id) { - if (role === "ADMIN" || userId === orgOwnerId) { + if ( + role === "ADMIN" || + userId === orgOwnerId || + role === "PROJECT_MANAGER" + ) { return name === "org" || name === "availability"; } else { return name === "role" || name === "org" || name === "availability";