"use client"; import { RFA } from "@/types/rfa"; import { DataTable } from "@/components/common/data-table"; import { ColumnDef } from "@tanstack/react-table"; import { StatusBadge } from "@/components/common/status-badge"; import { Button } from "@/components/ui/button"; import { Eye } from "lucide-react"; import Link from "next/link"; import { format } from "date-fns"; interface RFAListProps { data: { items: RFA[]; total: number; page: number; totalPages: number; }; } export function RFAList({ data }: RFAListProps) { const columns: ColumnDef[] = [ { accessorKey: "rfa_number", header: "RFA No.", cell: ({ row }) => ( {row.getValue("rfa_number")} ), }, { accessorKey: "subject", header: "Subject", cell: ({ row }) => (
{row.getValue("subject")}
), }, { accessorKey: "contract_name", header: "Contract", }, { accessorKey: "discipline_name", header: "Discipline", }, { accessorKey: "created_at", header: "Date", cell: ({ row }) => format(new Date(row.getValue("created_at")), "dd MMM yyyy"), }, { accessorKey: "status", header: "Status", cell: ({ row }) => , }, { id: "actions", cell: ({ row }) => { const item = row.original; return (
); }, }, ]; return (
{/* Pagination component would go here */}
); }