Skip to content

Commit

Permalink
EPMRPP-98470 || Fix incorrect User Type values on "All Users" page at… (
Browse files Browse the repository at this point in the history
#4161)

* EPMRPP-98470 || Fix incorrect User Type values on "All Users" page at instance level

* EPMRPP-98470 || Code review fixes - 1
  • Loading branch information
iso9000t authored Jan 15, 2025
1 parent 1e28f05 commit 10254f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/src/common/constants/accountType.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ export const UPSA = 'UPSA';
export const GITHUB = 'GITHUB';
export const SAML = 'SAML';
export const SCIM = 'SCIM';

export const ACCOUNT_TYPE_DISPLAY_MAP = {
[UPSA]: 'Synched',
[INTERNAL]: 'Internal',
[GITHUB]: 'GitHub',
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { userInfoSelector } from 'controllers/user';
import { getRoleBadgesData } from 'common/utils/permissions/getRoleTitle';
import { NAMESPACE } from 'controllers/instance/allUsers/constants';
import { UserNameCell } from 'pages/common/membersPage/userNameCell/userNameCell';

import { ACCOUNT_TYPE_DISPLAY_MAP } from 'common/constants/accountType';
import {
DEFAULT_PAGE_SIZE,
DEFAULT_PAGINATION,
Expand All @@ -43,6 +43,9 @@ import { messages } from 'pages/common/users/membersListTable/messages';
import styles from './allUsersListTable.scss';

const cx = classNames.bind(styles);

const getDisplayAccountType = (accountType) => ACCOUNT_TYPE_DISPLAY_MAP[accountType] || accountType;

const AllUsersListTableComponent = ({
users,
onChangeSorting,
Expand Down Expand Up @@ -95,7 +98,7 @@ const AllUsersListTableComponent = ({
<span>n/a</span>
),
},
accountType: user.accountType.toLowerCase(),
accountType: getDisplayAccountType(user.accountType),
organizations: organizationsCount,
};
}),
Expand Down

0 comments on commit 10254f1

Please sign in to comment.