From 6e4ae058b87b22b0f802e9b55d3b0fe664c7806c Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Mon, 20 Nov 2023 09:22:45 -0500 Subject: [PATCH] :bug: Rename stakeholder and stakeholder group table's entity name column (#1556) Resolves: https://issues.redhat.com/browse/MTA-1694 On the Stakeholder and Stakeholder Group tables, the column "Display Name" was renamed to "Name" to match the add/edit form. Any other columns and filters that needed to be adjusted to accommodate this change were adjusted. Signed-off-by: Scott J Dickerson --- .../stakeholder-groups/stakeholder-groups.tsx | 15 ++++++------- .../controls/stakeholders/stakeholders.tsx | 21 ++++++++----------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/client/src/app/pages/controls/stakeholder-groups/stakeholder-groups.tsx b/client/src/app/pages/controls/stakeholder-groups/stakeholder-groups.tsx index f507218988..9978549230 100644 --- a/client/src/app/pages/controls/stakeholder-groups/stakeholder-groups.tsx +++ b/client/src/app/pages/controls/stakeholder-groups/stakeholder-groups.tsx @@ -102,7 +102,7 @@ export const StakeholderGroups: React.FC = () => { idProperty: "name", items: stakeholderGroups, columnNames: { - displayName: "Display name", + name: "Name", description: "Description", count: "Member count", }, @@ -153,13 +153,13 @@ export const StakeholderGroups: React.FC = () => { }, }, ], - sortableColumns: ["displayName", "description", "count"], + sortableColumns: ["name", "description", "count"], getSortValues: (item) => ({ - displayName: item?.name || "", + name: item?.name || "", description: item?.description || "", count: numStr(item?.stakeholders?.length), }), - initialSort: { columnKey: "displayName", direction: "asc" }, + initialSort: { columnKey: "name", direction: "asc" }, isLoading: isFetching, }); @@ -225,7 +225,7 @@ export const StakeholderGroups: React.FC = () => { - + @@ -264,10 +264,7 @@ export const StakeholderGroups: React.FC = () => { item={stakeholderGroup} rowIndex={rowIndex} > - + {stakeholderGroup.name} { }; const tableControls = useLocalTableControls({ - idProperty: "name", + idProperty: "email", items: stakeholders, columnNames: { - name: "Email", - displayName: "Display name", + email: "Email", + name: "Name", jobFunction: "Job function", groupCount: "Group count", }, @@ -162,10 +162,10 @@ export const Stakeholders: React.FC = () => { }, }, ], - sortableColumns: ["name", "displayName", "jobFunction"], + sortableColumns: ["email", "name", "jobFunction"], getSortValues: (item) => ({ - name: item?.email || "", - displayName: item?.name || "", + email: item?.email || "", + name: item?.name || "", jobFunction: item.jobFunction?.name || "", }), initialSort: { columnKey: "name", direction: "asc" }, @@ -233,8 +233,8 @@ export const Stakeholders: React.FC = () => { + - @@ -273,13 +273,10 @@ export const Stakeholders: React.FC = () => { item={stakeholder} rowIndex={rowIndex} > - + {stakeholder.email} - + {stakeholder.name}