"use client" import { ColumnDef } from "@tanstack/react-table" import { Badge } from "@/shared/components/ui/badge" import { Button } from "@/shared/components/ui/button" import { Eye, CheckSquare } from "lucide-react" import { ExamSubmission } from "../types" import Link from "next/link" import { formatDate } from "@/shared/lib/utils" export const submissionColumns: ColumnDef[] = [ { accessorKey: "studentName", header: "Student", }, { accessorKey: "examTitle", header: "Exam", }, { accessorKey: "submittedAt", header: "Submitted", cell: ({ row }) => ( {formatDate(row.original.submittedAt)} ), }, { accessorKey: "status", header: "Status", cell: ({ row }) => { const status = row.original.status const variant = status === "graded" ? "secondary" : "outline" return {status} }, }, { accessorKey: "score", header: "Score", cell: ({ row }) => ( {row.original.score ?? "-"} ), }, { id: "actions", cell: ({ row }) => (
), }, ]