Skip to content

Commit

Permalink
Merge branch 'main' into app-edit
Browse files Browse the repository at this point in the history
  • Loading branch information
sjd78 authored Jul 11, 2024
2 parents ce80306 + fc7f23c commit ec3b308
Showing 1 changed file with 17 additions and 29 deletions.
46 changes: 17 additions & 29 deletions client/src/app/pages/identities/identities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
});
Expand Down Expand Up @@ -275,10 +268,7 @@ export const Identities: React.FC = () => {
{...getThProps({ columnKey: "description" })}
/>
<Th width={25} {...getThProps({ columnKey: "type" })} />

{/*
//TODO: Enable conditional rendering for createdBy column
<Th {...getThProps({ columnKey: "createdBy" })} /> */}
<Th {...getThProps({ columnKey: "createdBy" })} />
</TableHeaderContentWithControls>
</Tr>
</Thead>
Expand Down Expand Up @@ -340,14 +330,12 @@ export const Identities: React.FC = () => {
>
{typeFormattedString?.value}
</Td>
{/*
Todo: Enable conditional rendering for createdBy column
<Td
width={10}
{...getTdProps({ columnKey: "createdBy" })}
>
{identity.createdBy}
</Td> */}
{identity.createUser}
</Td>
<AppTableActionButtons
isDeleteEnabled={
trackers.some(
Expand Down

0 comments on commit ec3b308

Please sign in to comment.