Skip to content

Commit

Permalink
fix(OH2-441): Show group code in users table and update labels (#707)
Browse files Browse the repository at this point in the history
Co-authored-by: SteveGT96 <[email protected]>
  • Loading branch information
SteveGT96 and SteveGT96 authored Dec 7, 2024
1 parent 4733480 commit 3f172ec
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
};
Expand All @@ -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,
},
Expand All @@ -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 ? <CheckOutlined fontSize="small" /> : "",
Expand Down

0 comments on commit 3f172ec

Please sign in to comment.