Recurring invoice detail page
One recurring invoice: header with edit, pause, resume and cancel, a paused notice, details, the next invoices, the line template and the invoices it generated, with loading, not-found and error states. Plain node props for header actions, banners, an aside and the error state.
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
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-recurring-invoice-detail-pageAlso installs: base-theme, base-page, base-states, ar-schedule-detail, ar-schedule-parts, ui-ar-recurring-invoice-detail-page.
Usage
import { ArRecurringInvoiceDetailPage } from "@/components/dolfin/ar/recurring-invoice-detail-page";
// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route({ params }: { params: { scheduleId: string } }) {
return <ArRecurringInvoiceDetailPage scheduleId={params.scheduleId} />;
}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 |
|---|---|---|
scheduleId required | string | |
headerActions | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Buttons before the status in the header. |
banners | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Above the cards: notices such as delivery or accounting status. |
aside | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Beside the details on wide pages, under the upcoming invoices. |
errorState | string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re… | Replaces the not-found and load error state. |
readOnly | boolean | Hide edit, pause, resume and cancel. |
onChanged | (schedule: Schedule) => void | After the schedule was paused, resumed or cancelled here. |
onNavigate | (route: DolfinRoute) => void | Replaces the provider's navigation (back, edit, the customer link). |
className | string |
Customisation
Without editing the source, you can change:
- Class names
className- Messages
ar.schedules
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.
useCanManageSchedulesuseDolfinNavigateuseMessagesuseScheduleuseScheduleActionsuseScheduleOccurrencesFiles
Written to your app by the install command:
components/dolfin/ar/recurring-invoice-detail-page.tsx177 lines