dolfindevelopers

Purchase order detail page

PagePayablesSDK + UI

One purchase order: back link, header with Edit, Close and Cancel, details, supplier, lines with match progress, matched bills and linked delivery notes. Accepts your own header actions (replacing Edit) 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

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-purchase-order-detail-page

Also installs: ap-purchase-order-detail, ap-purchase-order-form-dialog, base-page, ui-ap-purchase-order-detail-page.

Usage

route.tsx
import { PurchaseOrderDetailPage } from "@/components/dolfin/ap/purchase-order-detail-page";

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

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

API reference

PropTypeDescription
purchaseOrderId requiredstring
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Beside Close and Cancel. Defaults to Edit while the order is open; pass `null` for none.
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…A column beside the order.
hideBackLinkbooleanHide the "Back to purchase orders" link.
hideDeliveryNotesbooleanHide the linked delivery notes card.
onSaved(purchaseOrder: PurchaseOrder) => voidAfter the order is edited from this page.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.orders.purchaseOrder

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/purchase-order-detail-page.tsx 74 lines