import type { ColumnDef } from "@tanstack/react-table"; import { Badge } from "~/components/ui/badge"; import { Checkbox } from "~/components/ui/checkbox"; import type { Proyek } from "~/types/api/proyek"; import { StatusProject } from "~/types/constants/status-project"; import { CellAction } from "./cell-action"; export const columns: ColumnDef[] = [ { id: "select", header: ({ table }) => ( table.toggleAllPageRowsSelected(!!value)} /> ), cell: ({ row }) => ( row.toggleSelected(!!value)} /> ), enableSorting: false, enableHiding: false, }, { accessorKey: "user.nama", header: "PEMILIK PROYEK", cell: ({ row }) => { return ( {row.original.user ? row.original.user.nama : "Unknown User"} ); }, }, { accessorKey: "judul", header: "NAMA PROYEK", cell: ({ row }) => { return {row.original.judul}; }, }, { accessorKey: "kategori.kategori", header: "KATEGORI", }, { accessorKey: "status", header: "STATUS", cell: ({ row }) => { return ( {row.original.status} ); }, }, { id: "actions", header: "AKSI", cell: ({ row }) => , }, ];