Skip to content

Commit

Permalink
EPMRPP-96877 || Member user can see data in columns (#4094)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlazarQSO authored Nov 12, 2024
1 parent f610f72 commit 7c98be6
Showing 1 changed file with 24 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const OrganizationsTable = ({ organizationsList }) => {
const hasPermission =
userRole === ADMINISTRATOR || assignedOrganizations[slug]?.organizationRole === MANAGER;

return {
const mainColumns = {
id,
name: {
content: name,
Expand All @@ -69,17 +69,29 @@ export const OrganizationsTable = ({ organizationsList }) => {
</div>
),
},
projectsCount: relationships.projects.meta.count,
usersCount: relationships.users.meta.count,
launchesCount: relationships.launches.meta.count,
lastLaunch: {
content: lastLaunch,
component: lastLaunch ? (
<AbsRelTime startTime={lastLaunch} customClass={cx('date')} />
) : (
<span>n/a</span>
),
},
projectsCount: '',
usersCount: '',
launchesCount: '',
lastLaunch: '',
};

return {
...mainColumns,
...(hasPermission
? {
projectsCount: relationships.projects.meta.count,
usersCount: relationships.users.meta.count,
launchesCount: relationships.launches.meta.count,
lastLaunch: {
content: lastLaunch,
component: lastLaunch ? (
<AbsRelTime startTime={lastLaunch} customClass={cx('date')} />
) : (
<span>n/a</span>
),
},
}
: {}),
};
}),
[organizationsList, assignedOrganizations],
Expand Down

0 comments on commit 7c98be6

Please sign in to comment.