import { DataTable } from "@/components/DataTable"; import { ColumnDef } from "@tanstack/react-table"; import { Badge } from "@/components/ui/badge"; interface MockAsset { code: string; name: string; department: string; status: string; category: string; } const MOCK_DATA: MockAsset[] = [ { code: "PHRC-ICU-0001", name: "Ventilator", department: "ICU", status: "In Service", category: "Life Support" }, { code: "PHRC-ICU-0002", name: "Patient Monitor", department: "ICU", status: "Under Repair", category: "Monitoring" }, { code: "PHRC-OT-0001", name: "Anaesthesia Machine", department: "Operation Theatre", status: "In Service", category: "Life Support" }, { code: "PHRC-RAD-0001", name: "CT Scanner", department: "Radiology", status: "In Service", category: "Imaging" }, { code: "PHRC-RAD-0002", name: "X-Ray Unit", department: "Radiology", status: "Out of Service", category: "Imaging" }, { code: "PHRC-EM-0001", name: "Defibrillator", department: "Emergency", status: "In Service", category: "Life Support" }, { code: "PHRC-PATH-0001", name: "Centrifuge", department: "Pathology", status: "In Service", category: "Laboratory" }, { code: "PHRC-DIAL-0001", name: "Dialysis Machine", department: "Dialysis", status: "In Service", category: "Dialysis" }, ]; const STATUS_VARIANTS: Record = { "In Service": "success", "Under Repair": "danger", "Out of Service": "warning", Condemned: "outline", }; const columns: ColumnDef[] = [ { accessorKey: "code", header: "Asset Code", enableColumnFilter: true }, { accessorKey: "name", header: "Equipment Name", enableColumnFilter: true }, { accessorKey: "category", header: "Category", enableColumnFilter: true }, { accessorKey: "department", header: "Department", enableColumnFilter: true }, { accessorKey: "status", header: "Status", enableColumnFilter: true, cell: ({ getValue }) => { const v = getValue() as string; return {v}; }, }, ]; export function DataTableDemoPage() { return (

Phase 0 — DataTable Demo

Mock asset data demonstrating column filters, sort, pagination, column visibility, and CSV export. Every list in the app will use this component.

); }