Submit bill for review dialog
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
Ready to connect to Dolfin. Loads data through SDK hooks, with appearance and behaviour you can customise. Requires DolfinProvider.
Installation
Needs the Dolfin registry token. The CLI copies the source into your app.
bunx --bun shadcn@4.23.0 add @dolfin/ap-submit-review-dialogAlso installs: button, badge, checkbox, dialog, popover, command, base-theme, base-states, ui-ap-submit-review-dialog.
Usage
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
| Prop | Type | Description |
|---|---|---|
open required | boolean | |
onOpenChange required | (open: boolean) => void | |
onConfirm required | () => void | Called on "Confirm & Submit"; close the dialog when the submission succeeds. |
submitting | boolean | |
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. |
settingsLink | string | 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. |
children | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Extra content above the buttons. |
className | string |
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.
useBillReviewersuseMessagesFiles
Written to your app by the install command:
components/dolfin/ap/submit-review-dialog.tsx60 linescomponents/dolfin/ap/reviewer-multi-select.tsx99 lines