"use client"; import { ColumnDef } from "@tanstack/react-table"; import { DateWithTime } from "@/components/ui/entities"; import { DataTableColumnHeader } from "@/components/ui/table"; import { ProviderGroup } from "@/types"; import { DataTableRowActions } from "./data-table-row-actions"; const getProviderData = (row: { original: ProviderGroup }) => { return row.original; }; export const ColumnGroups: ColumnDef[] = [ { accessorKey: "name", header: ({ column }) => ( ), cell: ({ row }) => { const { attributes: { name }, } = getProviderData(row); return

{name}

; }, }, { accessorKey: "providers_count", header: ({ column }) => ( ), cell: ({ row }) => { const { relationships: { providers }, } = getProviderData(row); return (
{providers.meta.count}
); }, }, { accessorKey: "roles_count", header: ({ column }) => ( ), cell: ({ row }) => { const { relationships: { roles }, } = getProviderData(row); return (
{roles.meta.count}
); }, }, { accessorKey: "added", header: ({ column }) => ( ), cell: ({ row }) => { const { attributes: { inserted_at }, } = getProviderData(row); return ; }, }, { id: "actions", cell: ({ row }) => { return ; }, }, ];