dolfindevelopers

Edit recurring invoice page

PageReceivablesSDK + UI

Edit a recurring invoice's future invoices: the schedule form with unsaved changes ringed, start date and cadence locked once an invoice was generated, a conflict notice when it changed elsewhere, and a New product dialog. Sends only what changed and returns to the schedule. Takes header actions, banners, extra form cards and the error state as plain nodes.

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

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/ar-edit-recurring-invoice-page

Also installs: button, base-theme, base-page, base-info-hint, base-states, ar-schedule-form, ar-schedule-parts, ar-create-product-dialog, ui-ar-edit-recurring-invoice-page.

Usage

route.tsx
import { ArEditRecurringInvoicePage } from "@/components/dolfin/ar/edit-recurring-invoice-page";

// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route({ params }: { params: { scheduleId: string } }) {
  return <ArEditRecurringInvoicePage 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

PropTypeDescription
scheduleId requiredstring
onSaved(schedule: Schedule) => voidCalled with the saved schedule before the page goes back to it.
onNavigate(route: DolfinRoute) => voidReplaces the provider's navigation (back, cancel, after saving).
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons beside the status.
bannersstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Above the form.
fieldsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra cards after the line items.
hideCreateProductbooleanHides "New product" in the line pickers.
errorStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the not-found, load error and ended state.
classNamestring

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.

useDolfinNavigateuseMessagesuseSchedule

Files

Written to your app by the install command:

  • components/dolfin/ar/edit-recurring-invoice-page.tsx 108 lines