MINOR: supported displayName field in User listing page (#18404)

* supported displayName field in User listing page

* change the displayName to name for the consistency around name property around ui

* fix sonar issue

(cherry picked from commit b93390bb8ab94a3567a15dd85546061eff051c65)
This commit is contained in:
Ashish Gupta 2024-10-25 17:59:30 +05:30
parent 39d04ab768
commit 540ecefdd0
3 changed files with 10 additions and 2 deletions

View File

@ -72,7 +72,7 @@ describe('UsersTab', () => {
});
});
expect(await screen.findByText('Aaron Johnson')).toBeInTheDocument();
expect(await screen.findAllByText('Aaron Johnson')).toHaveLength(2);
expect(await screen.findByText('Sales')).toBeInTheDocument();
expect(await screen.findByText('Data Steward')).toBeInTheDocument();
});

View File

@ -436,7 +436,9 @@ const UserListPageV1 = () => {
data-testid="add-user"
type="primary"
onClick={handleAddNewUser}>
{t('label.add-entity', { entity: t('label.user') })}
{t('label.add-entity', {
entity: t(`label.${isAdminPage ? 'admin' : 'user'}`),
})}
</Button>
</LimitWrapper>
)}

View File

@ -47,6 +47,12 @@ export const commonUserDetailColumns = (
key: 'username',
render: (_, record) => userCellRenderer(record),
},
{
title: t('label.name'),
dataIndex: 'name',
key: 'name',
render: (_, record) => getEntityName(record),
},
{
title: t('label.team-plural'),
dataIndex: 'teams',