🌐(app-desk) translate role in member grid
The roles in the member grid were not being translated. This commit adds the translation for the roles in the member grid.
This commit is contained in:
@@ -84,9 +84,9 @@ describe('MemberGrid', () => {
|
||||
expect(screen.getByText('user1@test.com')).toBeInTheDocument();
|
||||
expect(screen.getByText('user2@test.com')).toBeInTheDocument();
|
||||
expect(screen.getByText('user3@test.com')).toBeInTheDocument();
|
||||
expect(screen.getByText(Role.OWNER)).toBeInTheDocument();
|
||||
expect(screen.getByText(Role.ADMIN)).toBeInTheDocument();
|
||||
expect(screen.getByText(Role.MEMBER)).toBeInTheDocument();
|
||||
expect(screen.getByText('Owner')).toBeInTheDocument();
|
||||
expect(screen.getByText('Admin')).toBeInTheDocument();
|
||||
expect(screen.getByText('Member')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('checks the pagination', async () => {
|
||||
|
||||
@@ -33,6 +33,12 @@ export const MemberGrid = ({ teamId, currentRole }: MemberGridProps) => {
|
||||
setPagesCount(data?.count ? Math.ceil(data.count / pageSize) : 0);
|
||||
}, [data?.count, pageSize, setPagesCount]);
|
||||
|
||||
const dictRole = {
|
||||
[Role.ADMIN]: t('Admin'),
|
||||
[Role.MEMBER]: t('Member'),
|
||||
[Role.OWNER]: t('Owner'),
|
||||
};
|
||||
|
||||
return (
|
||||
<Card
|
||||
className="m-b pb-s"
|
||||
@@ -78,8 +84,11 @@ export const MemberGrid = ({ teamId, currentRole }: MemberGridProps) => {
|
||||
headerName: t('Emails'),
|
||||
},
|
||||
{
|
||||
field: 'role',
|
||||
id: 'role',
|
||||
headerName: t('Roles'),
|
||||
renderCell({ row }) {
|
||||
return dictRole[row.role];
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'column-actions',
|
||||
|
||||
Reference in New Issue
Block a user