Send invoice dialog
Confirms sending an invoice: where it goes and what stops it (from the send plan, with fix buttons), then the email to review and tweak (tone, reminders, subject, CC, reply-to, greeting, opening message) beside a live preview.
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/ar-send-invoice-dialogAlso installs: button, checkbox, dialog, input, label, select, textarea, ui-ar-send-invoice-dialog.
Usage
import { SendInvoiceDialog } from "@/components/dolfin/ar/send-invoice-dialog";
// Place it anywhere inside your <DolfinProvider>.
<SendInvoiceDialog invoiceId={invoiceId} open={open} onOpenChange={handleOpenChange} />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 |
|---|---|---|
invoiceId required | string | |
open required | boolean | |
onOpenChange required | (open: boolean) => void | |
onFix | (fix: InvoiceSendFix) => void | Where a send problem is fixed. Without it, problems show no button. |
canFix | (fix: InvoiceSendFix) => boolean | |
onSent | () => void | Called with the sent invoice's id once the send went through. |
Customisation
Without editing the source, you can change:
- Messages
ar.invoice.preview.emailTitlear.invoice.send
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.
useInvoiceActionsuseInvoiceSendComposeruseMessagesFiles
Written to your app by the install command:
components/dolfin/ar/send-invoice-dialog.tsx69 lines