'use client'; import { ColumnDef } from '@tanstack/react-table'; import { Drawing } from '@/types/drawing'; import { Button } from '@/components/ui/button'; import { ArrowUpDown, MoreHorizontal } from 'lucide-react'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu'; export const columns: ColumnDef[] = [ { accessorKey: 'drawingNumber', header: ({ column }) => { return ( ); }, }, { accessorKey: 'title', header: 'Title', }, { accessorKey: 'revision', header: 'Revision', cell: ({ row }) => row.original.revision || '-', }, { accessorKey: 'legacyDrawingNumber', header: 'Legacy No.', cell: ({ row }) => row.original.legacyDrawingNumber || '-', }, { accessorKey: 'updatedAt', header: 'Last Updated', cell: ({ row }) => { const date = new Date(row.original.updatedAt || ''); return isNaN(date.getTime()) ? '-' : date.toLocaleDateString(); }, }, { id: 'actions', cell: ({ row }) => { const drawing = row.original; return ( Actions navigator.clipboard.writeText(drawing.drawingNumber)}> Copy Drawing No. View Details {/* Add download/view functionality later */} ); }, }, ];