import DeleteModal from '@/components/inertia/delete-modal'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { Button } from '@/components/ui/button'; import { ColumnDef } from '@tanstack/react-table'; import { ArrowUpDown, Pencil, Trash2 } from 'lucide-react'; import EditForm from './edit-form'; const TableColumn = (translate: LanguageTranslations): ColumnDef[] => { const { table, common } = translate; return [ { accessorKey: 'name', header: ({ column }) => { return (
); }, cell: ({ row }) => (
CN

{row.original.name}

{row.original.email}

), }, { accessorKey: 'status', header: table.status, cell: ({ row }) => (
{row.original.status === 1 ? common.active : common.inactive}
), }, { accessorKey: 'role', header: table.role, cell: ({ row }) => (
{row.original.role}
), }, { id: 'actions', header: () =>
{table.action}
, cell: ({ row }) => { return (
} /> } />
); }, }, ]; }; export default TableColumn;