Skip to content

Commit

Permalink
fix(user management): user table - allow user to scroll horizontally …
Browse files Browse the repository at this point in the history
…in roles column to view all the added information
  • Loading branch information
manojava-gk committed Oct 21, 2024
1 parent 361aea0 commit befcd92
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- **App Subscription Management**
- fixed 'read more' link by adding link [#1200](https://github.com/eclipse-tractusx/portal-frontend/pull/1200)
- **User Management**
- user table - allow user to scroll horizontally in roles column to view all the added information

### Feature

Expand Down
38 changes: 23 additions & 15 deletions src/components/shared/frame/UserList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ export const UserList = ({
{
field: 'name',
headerName: t('global.field.name'),
flex: 3,
flex: 2,
valueGetter: ({ row }: { row: TenantUser }) =>
`${row.firstName} ${row.lastName}`,
},
{ field: 'email', headerName: t('global.field.email'), flex: 3 },
{
field: 'status',
headerName: t('global.field.status'),
flex: 3,
flex: 1.5,
renderCell: ({ value: status }) => {
return (
<StatusTag color="label" label={t(`global.field.${status}`)} />
Expand All @@ -148,25 +148,33 @@ export const UserList = ({
{
field: 'roles',
headerName: t('global.field.role'),
flex: 4,
renderCell: ({ value: roles }) =>
roles.length
? roles.map((role: RoleType | string) => (
<StatusTag
key={typeof role === 'string' ? role : role.roleId}
color="label"
label={typeof role === 'string' ? role : role.roleName}
className="statusTag"
/>
))
: '',
flex: 5,
renderCell: ({ value: roles }) => (
<span
style={{
overflowX: 'scroll',
scrollbarWidth: 'none',
}}
>
{roles.length
? roles.map((role: RoleType | string) => (
<StatusTag
key={typeof role === 'string' ? role : role.roleId}
color="label"
label={typeof role === 'string' ? role : role.roleName}
className="statusTag"
/>
))
: ''}
</span>
),
},
{
field: 'details',
headerName: isDetail
? t('global.field.details')
: t('global.field.edit'),
flex: 2,
flex: 1.5,
renderCell: ({ row }: { row: TenantUser }) => (
<IconButton
disabled={onDetailsClick === undefined}
Expand Down

0 comments on commit befcd92

Please sign in to comment.