Bills list page
The bills list page: header with an Upload bills action, queue tabs and filters, a drop zone (or an upload dialog) and the bills table, taking your own header actions, the empty state and an aside.
Page: A complete screen for one route, such as a bill or the invoices list. Mount it on a route in your app; connected SDK pages provide data and actions; standalone UI pages receive them as props. Pages vs components
Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.
Installation
Needs the Dolfin registry token. The CLI copies the source into your app.
bunx --bun shadcn@4.23.0 add @dolfin/ap-bills-list-pageAlso installs: button, base-theme, base-page, ap-bills-filters, ap-bills-table, ap-bill-upload-dialog, ui-ap-bills-list-page.
Usage
import { ApBillsListPage } from "@/components/dolfin/ap/bills-list-page";
// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route() {
return <ApBillsListPage />;
}Renders inside DolfinProvider (set it up once). By default it loads its own data through the SDK. Supplied-data examples show how to override that behavior.
API reference
| Prop | Type | Description |
|---|---|---|
filters | BillListFilters | Initial filters, e.g. read from the URL. |
onFiltersChange | (filters: BillListFilters) => void | Called after each filter change, e.g. to write the filters back to the URL. |
upload | false | "inline" | "dialog" | `"inline"` (default): a drop zone above the list, opened by the header button too. `"dialog"`: the header button opens an upload dialog. `false`: no upload. |
onUploadComplete | (batch: BillUploadBatch) => void | After an upload created bills. A single upload then opens the new bill unless `openOnUpload` is false. |
openOnUpload | boolean | |
onNavigate | (route: DolfinRoute) => void | Overrides the provider's navigation (upload success and row actions). |
pageSize | number | |
hideFilters | readonly ApBillsFilterControl[] | |
columns | BillColumn[] | ((defaults: BillColumn[]) => BillColumn[]) | |
columnOrder | readonly string[] | |
columnVisibility | Readonly<Partial<Record<string, boolean>>> | |
rowActions | BillRowAction[] | ((defaults: BillRowAction[]) => BillRowAction[]) | |
headerActions | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Rendered before the Upload bills button (or instead of it with `upload={false}`). |
emptyState | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Replaces the table's empty state. |
aside | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Rendered beside the list on wide pages (e.g. an inbox address, accounting sync status). |
title | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | |
eyebrow | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | |
className | string |
Customisation
Without editing the source, you can change:
- Class names
className- Messages
ap.bills
Or edit the installed file directly: it is your code. See theming for colours and fonts.
Hooks
The SDK hooks this page uses. Use them directly from @dolfinai/react to build your own version.
useBillFiltersuseBillUploaduseMessagesFiles
Written to your app by the install command:
components/dolfin/ap/bills-list-page.tsx151 lines