dolfindevelopers

Purchase order form parts

ComponentPayablesSDK + UI

Pieces shared by the purchase order and delivery note dialogs: labelled fields with required marks and inline errors, form sections, line cards, a server-searched supplier picker and a calendar date picker.

Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. 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-purchase-order-form-parts

Also installs: button, calendar, command, field, popover, base-theme, ui-ap-purchase-order-form-parts.

Usage

screen.tsx
import { OrderFormSection } from "@/components/dolfin/ap/order-form-parts";

// Place it anywhere inside your <DolfinProvider>.
<OrderFormSection title={title} children={children} />

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
title requiredstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
children requiredstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
descriptionstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…
actionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…

Customisation

Without editing the source, you can change:

Messages
ap.orders.formbase.states.retry

Or edit the installed file directly: it is your code. See theming for colours and fonts.

Hooks

The SDK hooks this component uses. Use them directly from @dolfinai/react to build your own version.

useDolfinLocaleuseMessagesuseSupplierOptions

Files

Written to your app by the install command:

  • components/dolfin/ap/order-form-parts.tsx 273 lines