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 ApplicationApproval from './application-approval'; const InstructorsTableColumn = (isAdmin: boolean, translate: LanguageTranslations): ColumnDef[] => { const { table } = translate; return [ { accessorKey: 'name', header: ({ column }) => { return (
); }, cell: ({ row }) => (
CN

{row.original.user.name}

{row.original.user.email}

), }, { accessorKey: 'courses', header: table.number_of_course, cell: ({ row }) => (

{row.original.courses_count} {table.courses_count}

), }, { accessorKey: 'status', header: table.status, cell: ({ row }) => (
{row.original.status}
), }, { id: 'actions', header: () =>
{table.action}
, cell: ({ row }) => { return (
{table.status} } /> {isAdmin && ( } /> )}
); }, }, ]; }; export default InstructorsTableColumn;