diff --git a/client/src/app/pages/identities/identities.tsx b/client/src/app/pages/identities/identities.tsx index b10f14ca52..0523076356 100644 --- a/client/src/app/pages/identities/identities.tsx +++ b/client/src/app/pages/identities/identities.tsx @@ -150,10 +150,7 @@ export const Identities: React.FC = () => { description: t("terms.description"), type: t("terms.type"), - //TODO: Enable conditional rendering for createdBy column - // ...(isAuthRequired && { createdBy: t("terms.createdBy") } - // ? { createdBy: t("terms.createdBy") } - // : {}), + createdBy: t("terms.createdBy"), }, isFilterEnabled: true, isSortEnabled: true, @@ -182,29 +179,25 @@ export const Identities: React.FC = () => { return item.kind || ""; }, }, - //TODO: Enable conditional rendering for createdBy column - // ...(isAuthRequired - // ? [ - // { - // categoryKey: "createdBy", - // title: "Created By", - // type: FilterType.search, - // placeholderText: "Filter by created by User...", - // getItemValue: (item: Identity) => { - // return item.createUser || ""; - // }, - // } as const, - // ] - // : []), + { + categoryKey: "createdBy", + title: t("terms.createdBy"), + type: FilterType.search, + placeholderText: t("actions.filterBy", { + what: t("terms.createdBy") + "...", + }), + getItemValue: (item: Identity) => { + return item.createUser || ""; + }, + }, ], initialItemsPerPage: 10, - sortableColumns: ["name", "type"], + sortableColumns: ["name", "type", "createdBy"], initialSort: { columnKey: "name", direction: "asc" }, getSortValues: (item) => ({ name: item?.name || "", type: item?.kind || "", - //TODO: Enable conditional rendering for createdBy column - // ...(isAuthRequired && { createdBy: item?.createUser } ? { createdBy: item?.createUser } : {}), + createdBy: item?.createUser || "", }), isLoading: isFetching, }); @@ -275,10 +268,7 @@ export const Identities: React.FC = () => { {...getThProps({ columnKey: "description" })} /> - - {/* - //TODO: Enable conditional rendering for createdBy column - */} + @@ -340,14 +330,12 @@ export const Identities: React.FC = () => { > {typeFormattedString?.value} - {/* - Todo: Enable conditional rendering for createdBy column - {identity.createdBy} - */} + {identity.createUser} +