Skip to content

Commit

Permalink
Merge pull request #870 from AI4Bharat/org-permission
Browse files Browse the repository at this point in the history
Org permission
  • Loading branch information
aparna-aa authored Jan 10, 2025
2 parents 2fc8144 + 739162e commit 3ba83f0
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/containers/Organization/Project/CreateNewProject.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,18 @@ const CreatenewProject = () => {
const navigate = useNavigate();
const dispatch = useDispatch();

const userList = useSelector(
(state) => state.getOrganizatioProjectManagersUser.data
);

const projectManagers = useSelector(
(state) => state.getOrganizatioProjectManagersUser.data
);
const orgUsers = useSelector((state) => state.getOrganizatioUsers.data);

const filteredOrgUsers = (orgUsers || []).filter(
(user) => user.role === "ORG_OWNER"
);
const userList = [...(projectManagers || []), ...filteredOrgUsers];


const transcriptTypes = useSelector((state) => state.getTranscriptTypes.data);
const translationTypes = useSelector(
(state) => state.getTranslationTypes.data
Expand Down Expand Up @@ -230,7 +239,7 @@ const CreatenewProject = () => {
);
}}
>
{userList.map((name, index) => (
{userList?.map((name, index) => (
<MenuItem key={index} value={name}>
<Checkbox checked={managerUsername.indexOf(name) > -1} />
{name.email}
Expand Down

0 comments on commit 3ba83f0

Please sign in to comment.