dolfindevelopers

Recurring invoices table

ComponentReceivablesSDK + UI

Recurring invoices with their customer (memo or line count beneath), cadence and start, the next invoice and whether it is sent or left as a draft, progress through the run and status, plus an optional per-invoice amount column (hidden by default). Rows open the schedule; the row menu opens the customer, edits, pauses, resumes and cancels. Configurable columns and row actions, a status filter, cursor pagination and loading, empty and error states.

Component: A piece you place inside your own screens: a table, a form, a card or a dialog. You decide the layout around it. 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-schedules-table

Also installs: button, base-theme, base-data-table, base-entity-cell, base-money, base-states, ar-invoices-filters, ar-schedule-parts, ui-ar-schedules-table.

Usage

screen.tsx
import { ArSchedulesTable } from "@/components/dolfin/ar/schedules-table";

// Place it anywhere inside your <DolfinProvider>.
<ArSchedulesTable />

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
filtersScheduleListFiltersFilters for the list the table loads. With your own `schedules`, they only pick the "no matches" empty state.
schedulesreadonly ScheduleTableRow[]Your own rows: the table then shows them and makes no request. Its row menu then offers Edit, Pause and Resume only for the callbacks you pass.
loadingboolean
errorError
onRetry() => void
pagenumber1-based page number, for your own rows.
hasNextPageboolean
onPageChange(page: number) => voidShows the pager for your own rows.
onEdit(schedule: Schedule) => voidAdds Edit to editable schedules' menus (with your own rows).
onPause(schedule: Schedule) => voidAdds Pause to active schedules' menus (with your own rows).
onResume(schedule: Schedule) => voidAdds Resume to paused schedules' menus (with your own rows).
pageSizenumber
columnsScheduleColumn[] | ((defaults: ScheduleColumn[]) => ScheduleColumn[])Replace or extend the default columns.
columnOrderreadonly string[]
columnVisibilityReadonly<Partial<Record<string, boolean>>>
rowActionsScheduleRowAction[] | ((defaults: ScheduleRowAction[]) => ScheduleRowAction[])Replace or extend the row menu (defaults: Open customer, Edit, Pause or Resume, Cancel).
onCancel(schedule: Schedule) => voidAdds the Cancel action; the caller confirms (e.g. with `ScheduleCancelDialog`).
readOnlybooleanHides Edit, Pause, Resume and Cancel.
onNavigate(route: DolfinRoute) => void
onRowClick(schedule: ScheduleTableRow) => voidCalled when a row is clicked; given, it replaces the row's link.
getRowRoute(schedule: ScheduleTableRow) => DolfinRoute | nullWhere a row links to when there is no `onRowClick`; the schedule by default (`null` for a plain row).
emptyStatestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Replaces the default empty state.
emptyActionstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…An action inside the default empty state (e.g. a New recurring invoice button).
onClearFilters() => voidShown in the default "no matches" state, to clear the filters.
isRowBusy(schedule: ScheduleTableRow) => booleanShows a spinner on a row's menu (e.g. while it pauses).
actionsHeaderstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…The row menu column's header. Defaults to "Actions" for screen readers only; pass text to show one.
classNamestring
variantDataTableVariant
classNamesDataTableClassNames
pagerbooleanShow the built-in previous / next pager when there is more than one page. Default true; pass false when you draw your own pager from the list's pagination (the table still dims while a page loads).
onRowHover(row: ScheduleTableRow | null) => voidCalled with the row the pointer moves onto, and with `null` when the pointer leaves the rows (e.g. to highlight the row's point in a chart next to the table). Moving between rows reports the new row without a `null` first.

Customisation

Without editing the source, you can change:

Class names
classNameclassNames.frameclassNames.headerclassNames.headerCellclassNames.rowclassNames.cellclassNames.pager
Messages
ar.schedules

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

Hooks

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

useCanManageSchedulesuseDolfinLocaleuseDolfinNavigateuseMessagesuseScheduleActionsuseSchedules

Files

Written to your app by the install command:

  • components/dolfin/ar/schedules-table.tsx 401 lines
  • components/dolfin/ar/schedule-columns.tsx 102 lines