Skip to content

Commit

Permalink
EPMRPP-96551 || Users are not displayed in the search results for Man…
Browse files Browse the repository at this point in the history
…ager and Member-editor
  • Loading branch information
BlazarQSO committed Dec 5, 2024
1 parent 4ae3118 commit bc35d45
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions app/src/components/inputs/inputUserSearch/inputUserSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,22 @@ export const makeOptions = (isAdmin, projectKey, { organizationSlug, projectSlug
content: options,
}) =>
options.map((option) => {
const isAssignedProject = !!findAssignedProjectByOrganization(
option.assignedProjects,
option.assignedOrganizations[organizationSlug]?.organizationId,
projectSlug,
);
let isAssignedProject = false;

if (isAdmin) {
isAssignedProject = !!findAssignedProjectByOrganization(
option.assignedProjects,
option.assignedOrganizations[organizationSlug]?.organizationId,
projectSlug,
);
}

return {
userName: option.fullName || '',
userLogin: isAdmin ? option.userId : option.login,
email: option.email || '',
disabled: isAdmin ? isAssignedProject : false,
isAssigned: isAdmin ? isAssignedProject : false,
disabled: isAssignedProject,
isAssigned: isAssignedProject,
userAvatar: URLS.dataUserPhoto(projectKey, isAdmin ? option.userId : option.login, true),
assignedProjects: option.assignedProjects || {},
assignedOrganizations: option.assignedOrganizations || {},
Expand Down

0 comments on commit bc35d45

Please sign in to comment.