From 3358421658ecb39ebc6483eb59ffb3909983814e Mon Sep 17 00:00:00 2001 From: Siyasanga Date: Tue, 22 Oct 2024 10:18:23 +0200 Subject: [PATCH] Use constants.humanName on the UserList.tsx comp To ensure that we get the format from the country-config https://github.com/opencrvs/opencrvs-core/issues/6830 --- .../client/src/views/SysAdmin/Team/user/UserList.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx index 34a7659c9ab..42e43a1dc7f 100644 --- a/packages/client/src/views/SysAdmin/Team/user/UserList.tsx +++ b/packages/client/src/views/SysAdmin/Team/user/UserList.tsx @@ -553,10 +553,12 @@ function UserListComponent(props: IProps) { (user: User | null, index: number) => { if (user !== null) { const name = - (user && - user.name && - ((createNamesMap(user.name)[intl.locale] as string) || - (createNamesMap(user.name)[LANG_EN] as string))) || + (user.name && + intl.formatMessage(constantsMessages.humanName, { + firstName: user.name[0].firstNames, + middleName: user.name[0].middleName, + lastName: user.name[0].familyName + })) || '' const role = intl.formatMessage({ id: getUserRoleIntlKey(user.role._id)