[] = [
const relationships = getRoleRelationships(row);
const count = relationships.users.meta.count;
return (
-
+
{count === 0
? "No Users"
: `${count} ${count === 1 ? "User" : "Users"}`}
@@ -62,7 +62,7 @@ export const ColumnsRoles: ColumnDef[] = [
cell: ({ row }) => {
const relationships = getRoleRelationships(row);
return (
-
+
{relationships.invitations.meta.count === 0
? "No Invitations"
: `${relationships.invitations.meta.count} ${
@@ -74,26 +74,31 @@ export const ColumnsRoles: ColumnDef[] = [
);
},
},
- // {
- // accessorKey: "updated_at",
- // header: ({ column }) => (
- //
- // ),
- // cell: ({ row }) => {
- // const { updated_at } = getRoleAttributes(row);
- // return ;
- // },
- // },
+ {
+ accessorKey: "permission_state",
+ header: ({ column }) => (
+
+ ),
+ cell: ({ row }) => {
+ const { permission_state } = getRoleAttributes(row);
+ return (
+
+ {permission_state[0].toUpperCase() +
+ permission_state.slice(1).toLowerCase()}
+
+ );
+ },
+ },
{
accessorKey: "inserted_at",
header: ({ column }) => (
),
diff --git a/ui/types/components.ts b/ui/types/components.ts
index 77c8785747..561e6b2d86 100644
--- a/ui/types/components.ts
+++ b/ui/types/components.ts
@@ -247,6 +247,7 @@ export interface RolesProps {
manage_integrations: boolean;
manage_scans: boolean;
unlimited_visibility: boolean;
+ permission_state: "unlimited" | "limited" | "none";
inserted_at: string;
updated_at: string;
};