dolfindevelopers

Delivery notes list page

PagePayablesSDK + UI

The delivery notes list page: Payables header with New delivery note, and the delivery notes table with Edit, Close and Cancel row actions. Accepts your own header actions (replacing the default button), the empty state and an aside; takes the table's columns, rowActions and filters.

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

Works with Dolfin’s SDK context, 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-delivery-notes-list-page

Also installs: ap-delivery-notes-table, ap-delivery-note-form-dialog, base-data-table, base-page, ui-ap-delivery-notes-list-page.

Usage

route.tsx
import { DeliveryNotesListPage } from "@/components/dolfin/ap/delivery-notes-list-page";

// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route() {
  return <DeliveryNotesListPage />;
}

Renders inside DolfinProvider (set it up once). It renders the data you pass as props.

API reference

PropTypeDescription
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons beside the title. Defaults to "New delivery note"; pass `null` for none.
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…A column beside the table.
onSaved(deliveryNote: DeliveryNote) => voidAfter a note is recorded or edited from this page.
classNamestring
columnsDeliveryNoteColumnsProp
columnOrderreadonly string[]
columnVisibilityReadonly<Record<string, boolean>>
rowActionsDeliveryNoteRowActionsPropReplace or extend the row menu (Close, Cancel when their callbacks are given). Pass `[]` for none.
supplierIdstringThe list is one supplier's: the supplier column gives way to the number.
variantDataTableVariant
loadingboolean
filtersOrderListFiltersInitial filters when the table fetches: a supplier, a search.
errorError
deliveryNotesreadonly { id?: string; organisationId?: string; supplierId?: null | string; externalRef?: null | string; dnNumber: string; purchaseOrderId?…The rows to show. Passing them (or `loading` / `error`) fetches nothing; rows still link to the delivery note.
pagenumber1-based page shown; the pager shows with `onPageChange`.
filteredbooleanThe list is filtered, so the empty state says nothing matches.
onRetry() => void
pageSizenumber
hideToolbarbooleanHide the search and supplier filter (shown only when the table fetches).
toolbarActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra controls at the end of the toolbar.
resolvePurchaseOrderNumbersbooleanLook up each note's PO number (`purchaseOrderNumber` on the rows, for custom columns). Default: only while the "against" column is shown.
hasNextPageboolean
onPageChange(page: number) => void
supplierNamesReadonly<Record<string, string>>Supplier names by id, for the supplier column.
onClose(row: DeliveryNote) => voidShows Close on open rows. Wired for you when the table fetches.
onCancel(row: DeliveryNote) => voidShows Cancel on open rows. Wired for you when the table fetches.
pendingIdstringThe row an action is running on: its menu shows progress.
onRowClick(row: DeliveryNote) => voidCalled when a row is clicked; given, it replaces the row's link.
getRowRoute(row: DeliveryNote) => DolfinRoute | nullWhere a row links to when there is no `onRowClick`; the delivery note by default (`null` for a plain row).
classNamesDataTableClassNames
pagerbooleanShow the built-in previous / next pager when there is more than one page. Default true; pass false when you draw your own pager from the list's pagination (the table still dims while a page loads).
onRowHover(row: { id?: string; organisationId?: string; supplierId?: null | string; externalRef?: null | string; dnNumber: string; purchaseOrderId?: n…Called with the row the pointer moves onto, and with `null` when the pointer leaves the rows (e.g. to highlight the row's point in a chart next to the table). Moving between rows reports the new row without a `null` first.

Customisation

Without editing the source, you can change:

Class names
classNameclassNames.frameclassNames.headerclassNames.headerCellclassNames.rowclassNames.cellclassNames.pager
Messages
ap.orders

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.

useMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/delivery-notes-list-page.tsx 85 lines