import { CellContext, ColumnDef } from '@tanstack/react-table'; import { ownershipIcon } from '@/portainer/filters/filters'; import { ResourceControlOwnership } from '@/react/portainer/access-control/types'; import { Icon } from '@@/Icon'; export interface IResource { ResourceControl?: { Ownership: ResourceControlOwnership; }; } export function createOwnershipColumn(): ColumnDef< D, ResourceControlOwnership > { return { accessorFn: (row) => row.ResourceControl?.Ownership || ResourceControlOwnership.ADMINISTRATORS, header: 'Ownership', id: 'ownership', cell: OwnershipCell, }; function OwnershipCell({ getValue, }: CellContext) { const value = getValue(); return ( {value} ); } }