dolfindevelopers

Bills list page

PagePayablesSDK + UI

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

Choose your integration

Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.

Loading preview…

Installation

Needs the Dolfin registry token. The CLI copies the source into your app.

Terminal
bunx --bun shadcn@4.23.0 add @dolfin/ap-bills-list-page

Also installs: button, base-theme, base-page, ap-bills-filters, ap-bills-table, ap-bill-upload-dialog, ui-ap-bills-list-page.

Usage

route.tsx
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

PropTypeDescription
filtersBillListFiltersInitial filters, e.g. read from the URL.
onFiltersChange(filters: BillListFilters) => voidCalled after each filter change, e.g. to write the filters back to the URL.
uploadfalse | "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) => voidAfter an upload created bills. A single upload then opens the new bill unless `openOnUpload` is false.
openOnUploadboolean
onNavigate(route: DolfinRoute) => voidOverrides the provider's navigation (upload success and row actions).
pageSizenumber
hideFiltersreadonly ApBillsFilterControl[]
columnsBillColumn[] | ((defaults: BillColumn[]) => BillColumn[])
columnOrderreadonly string[]
columnVisibilityReadonly<Partial<Record<string, boolean>>>
rowActionsBillRowAction[] | ((defaults: BillRowAction[]) => BillRowAction[])
headerActionsstring | 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}`).
emptyStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the table's empty state.
asidestring | 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).
titlestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
eyebrowstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
classNamestring

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.

useBillFiltersuseBillUploaduseMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/bills-list-page.tsx 151 lines