import type { ColumnDef } from '@tanstack/react-table'; import { format } from 'date-fns'; import type { AcademicAdvisingLog } from '@/types/academic-advising-log'; export const advisingLogColumns: ColumnDef[] = [ { accessorKey: 'student.student_number', header: () => Mahasiswa, cell: ({ row }) => { const student = row.original.student; return (

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

{student?.student_number}

); }, }, { accessorKey: 'topic', header: () => Topik, cell: ({ row }) => row.original.topic || '-', }, { accessorKey: 'notes', header: () => Catatan, cell: ({ row }) => (

{row.original.notes || '-'}

), }, { accessorKey: 'session_date', header: () => Tanggal Sesi, cell: ({ row }) => { const sessionDate = row.original.session_date; return sessionDate ? format(new Date(sessionDate), 'd MMM yyyy, HH:mm') : '-'; }, }, ];