"use client" import FormDialog from "@/shared/components/form-dialog" import { Badge } from "@/shared/components/ui/badge" import { ResourcePage } from "@/shared/data-view/resource-page" import { ColumnHeader } from "@/shared/data-view/table-view" import { BillForm } from "@/modules/bills/bill-form" import { BILL_ROUTES } from "@garage/api" import type { BillsClient } from "@garage/api" export default function BillsPage() { return ( pageTitle="Bills" routeKey={BILL_ROUTES.INDEX} getClient={(api) => api.bills} headerProps={({ selectedItem, invalidateQuery }) => ({ actions: ( {(resourceId) => ( )} ), })} columns={({ actionsColumn }) => [ { accessorKey: "bill_number", header: ({ column }) => , cell: ({ row }) => (row.original as any).bill_number || "—", }, { accessorKey: "title", header: ({ column }) => , }, { accessorKey: "vendor_name", header: ({ column }) => , cell: ({ row }) => (row.original as any).vendor_name || "—", }, { accessorKey: "bill_date", header: ({ column }) => , cell: ({ row }) => { const value = (row.original as any).bill_date return value ? new Date(value).toLocaleDateString() : "—" }, }, { accessorKey: "bill_due_date", header: ({ column }) => , cell: ({ row }) => { const value = (row.original as any).bill_due_date return value ? new Date(value).toLocaleDateString() : "—" }, }, { accessorKey: "status", header: ({ column }) => , cell: ({ row }) => { const status = (row.original as any).status return {status || "—"} }, }, actionsColumn(), ]} /> ) }