From 3e6de07ea32d15e74cb7ccdfc62177c16624740a Mon Sep 17 00:00:00 2001 From: sagarika-padmanaban Date: Wed, 30 Oct 2024 18:22:20 +0530 Subject: [PATCH] fix --- .../Organization/MyOrganization.jsx | 93 +++++++++++++++---- src/styles/datasetStyle.js | 33 +++---- 2 files changed, 92 insertions(+), 34 deletions(-) diff --git a/src/containers/Organization/MyOrganization.jsx b/src/containers/Organization/MyOrganization.jsx index dde348e6..f7a7543c 100644 --- a/src/containers/Organization/MyOrganization.jsx +++ b/src/containers/Organization/MyOrganization.jsx @@ -71,7 +71,7 @@ const MyOrganization = () => { const [orgOwnerId, setOrgOwnerId] = useState(""); const [openUploadBulkVideoDialog, setOpenUploadBulkVideoDialog] = useState(false); - const [isUserOrgOwner, setIsUserOrgOwner] = useState(false); + const [isUserOrgOwner, setIsUserOrgOwner] = useState(false); const organizationDetails = useSelector( (state) => state.getOrganizationDetails.data @@ -138,11 +138,11 @@ const MyOrganization = () => { const { organization: { organization_owners }, } = userData; - + if (organization_owners && organization_owners?.length > 0) { - const ownerIds = organization_owners.map(owner => owner.id); + const ownerIds = organization_owners.map((owner) => owner.id); setOrgOwnerId(ownerIds); - + if (ownerIds.includes(userData.id)) { setIsUserOrgOwner(true); } else { @@ -169,7 +169,16 @@ const MyOrganization = () => { } return ( - + {organizationDetails?.title} ); @@ -188,31 +197,81 @@ const MyOrganization = () => { }; return ( - + {renderOrgDetails()} setValue(newValue)} + variant="fullWidth" aria-label="basic tabs example" + TabIndicatorProps={{ + style: { display: "none" }, + }} > - - - { roles.filter((role) => role.value === userData?.role)[0] + + + {roles.filter((role) => role.value === userData?.role)[0] ?.canAddMembers && ( - + )} - {(isUserOrgOwner|| userData?.role==="ADMIN") &&( - + {(isUserOrgOwner || userData?.role === "ADMIN") && ( + )} - {(isUserOrgOwner || userData?.role==="ADMIN")&&( + {(isUserOrgOwner || userData?.role === "ADMIN") && ( )} @@ -230,7 +289,9 @@ const MyOrganization = () => { alignItems="center" > - {(isUserOrgOwner|| userData?.role==="ADMIN" || userData?.role==="PROJECT_MANAGER") && ( + {(isUserOrgOwner || + userData?.role === "ADMIN" || + userData?.role === "PROJECT_MANAGER") && (