Skip to content

Commit

Permalink
EPMRPP-95153 | Small adjustment to rename constants (#4072)
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-hambardzumian authored Oct 28, 2024
1 parent abe1437 commit 4092f7c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/src/common/utils/permissions/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/

export const ADMIN = 'admin';
export const MANAGER = 'manager';
export const YOU = 'you';
export const ADMIN_TYPE = 'admin';
export const MANAGER_TYPE = 'manager';
export const YOU_TYPE = 'you';
10 changes: 5 additions & 5 deletions app/src/common/utils/permissions/getRoleTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import { defineMessages } from 'react-intl';
import { ADMINISTRATOR } from 'common/constants/accountRoles';
import { EDITOR } from 'common/constants/projectRoles';
import { ADMIN, MANAGER, YOU } from './constants';
import { EDITOR, MANAGER } from 'common/constants/projectRoles';
import { ADMIN_TYPE, MANAGER_TYPE, YOU_TYPE } from './constants';

const messages = defineMessages({
adminRole: {
Expand Down Expand Up @@ -61,19 +61,19 @@ export const getRoleBadgesData = (userRole, organizationRole, isCurrentLoggedInU
if (userRole === ADMINISTRATOR) {
badges.push({
title: messages.adminRole,
type: ADMIN,
type: ADMIN_TYPE,
});
}
if (organizationRole === MANAGER) {
badges.push({
title: messages.managerRole,
type: MANAGER,
type: MANAGER_TYPE,
});
}
if (isCurrentLoggedInUser) {
badges.push({
title: messages.youRole,
type: YOU,
type: YOU_TYPE,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
PAGE_KEY,
withPagination,
} from 'controllers/pagination';
import { ADMIN } from 'common/utils/permissions/constants';
import { ADMIN_TYPE } from 'common/utils/permissions/constants';
import { messages } from '../../common/membersPage/messages';
import styles from './projectTeamListTable.scss';
import { MembersListTable } from '../../common/membersPage/membersListTable';
Expand Down Expand Up @@ -103,7 +103,7 @@ const ProjectTeamListTableWrapped = ({
</div>
);

return type === ADMIN ? (
return type === ADMIN_TYPE ? (
<Tooltip
key={`${userId}-${type}-tooltip`}
content={formatMessage(messages.adminAccessInfo)}
Expand Down

0 comments on commit 4092f7c

Please sign in to comment.