From 3f172ec0c2f5790ba8c0b23916ea7e68006f795d Mon Sep 17 00:00:00 2001 From: Steve Tsala <45661418+SteveGT96@users.noreply.github.com> Date: Sat, 7 Dec 2024 16:53:30 +0100 Subject: [PATCH] fix(OH2-441): Show group code in users table and update labels (#707) Co-authored-by: SteveGT96 --- .../accessories/admin/users/usersTable/UsersTable.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/accessories/admin/users/usersTable/UsersTable.tsx b/src/components/accessories/admin/users/usersTable/UsersTable.tsx index a8b101841..72c42dd11 100644 --- a/src/components/accessories/admin/users/usersTable/UsersTable.tsx +++ b/src/components/accessories/admin/users/usersTable/UsersTable.tsx @@ -79,7 +79,7 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { const header = ["userName", "userGroupName", "desc", "deleted"]; const label = { userName: t("user.username"), - userGroupName: t("user.groups"), + userGroupName: t("user.group"), desc: t("user.description"), deleted: t("common.deleted"), }; @@ -88,14 +88,14 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { (state) => state.usergroups.groupList.data?.map((item) => ({ value: item.code ?? "", - label: item.desc ?? item.code ?? "", + label: item.code ?? "", })) ?? [] ); const filters: TFilterField[] = [ { key: "userGroupName", - label: t("user.groups"), + label: t("user.group"), type: "select", options: userGroupOptions, }, @@ -115,8 +115,7 @@ export const UsersTable = ({ headerActions, onEdit, onDelete }: IOwnProps) => { return data.map((item) => { return { userName: item.userName ?? "", - userGroupName: - item.userGroupName?.desc ?? item.userGroupName?.code ?? "", + userGroupName: item.userGroupName?.code ?? "", desc: item.desc ?? "", passwd: item.passwd ?? "", deleted: item.deleted ? : "",