import type { ColumnDef } from '@tanstack/react-table'; import { Eye } from 'lucide-react'; import { RowActions } from '@/components/row-actions'; import { show } from '@/routes/admin/manage/course-registrations'; import type { CourseRegistrationRow } from '@/types/course-registration'; export type { CourseRegistrationRow } from '@/types/course-registration'; export function createCourseRegistrationColumns(): ColumnDef[] { return [ { id: 'student', header: () => Mahasiswa, cell: ({ row }) => { const student = row.original.student; return (

{student?.user?.profile?.full_name ?? 'N/A'}

{student?.student_number}

); }, }, { id: 'actions', header: () => Aksi, meta: { className: 'w-[80px] text-center', headerClassName: 'w-[80px] text-center', }, cell: ({ row }) => ( , href: show.url(row.original.student_id), }, ]} /> ), }, ]; }