dolfindevelopers

Submit bill for review dialog

DialogPayablesSDK + UI

Confirms submitting a bill for review (the approval policies route it), asking for a tick when the supplier is still a guess. Also ships ReviewerMultiSelect, a searchable picker of organisation members for reviewer and approver fields.

Dialog: a modal you open from your own screen. You control when it opens with its 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-submit-review-dialog

Also installs: button, badge, checkbox, dialog, popover, command, base-theme, base-states, ui-ap-submit-review-dialog.

Usage

screen.tsx
import { SubmitReviewDialog } from "@/components/dolfin/ap/submit-review-dialog";

// Place it anywhere inside your <DolfinProvider>.
<SubmitReviewDialog open={open} onOpenChange={handleOpenChange} onConfirm={handleConfirm} />

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
open requiredboolean
onOpenChange required(open: boolean) => void
onConfirm required() => voidCalled on "Confirm & Submit"; close the dialog when the submission succeeds.
submittingboolean
unconfirmedSupplier{ name: string; percent?: number | null; }A guessed supplier that submitting will link. When set, submitting needs an explicit tick. Pass the suggestion's name and its match percentage.
settingsLinkstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Where to manage approval rules. Defaults to a link to the approval policies page; pass null to hide it.
childrenstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra content above the buttons.
classNamestring

Customisation

Without editing the source, you can change:

Class names
className
Messages
ap.bill.reviewersap.bill.submitDialogbase.statescore.errors

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

Hooks

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

useBillReviewersuseMessages

Files

Written to your app by the install command:

  • components/dolfin/ap/submit-review-dialog.tsx 60 lines
  • components/dolfin/ap/reviewer-multi-select.tsx 99 lines