dolfindevelopers

Receipt detail page

PageExpensesSDK + UI

One receipt: back link, header with View file and Read again, notices, the file beside what was read and its card transaction (match it by hand while unmatched), then its lines. ReactNode props for header actions, extra fields, extra sections and an aside.

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

Works with Dolfin’s SDK context, 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/expenses-receipt-detail-page

Also installs: expenses-receipt-detail, base-page, ui-expenses-receipt-detail-page.

Usage

route.tsx
import { ReceiptDetailPage } from "@/components/dolfin/expenses/receipt-detail-page";

// A whole screen: mount it on a route, inside your <DolfinProvider>.
export default function Route({ params }: { params: { receiptId: string } }) {
  return <ReceiptDetailPage receiptId={params.receiptId} />;
}

Renders inside DolfinProvider (set it up once). It renders the data you pass as props.

API reference

PropTypeDescription
receiptId requiredstring
asidestring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…A column beside the receipt.
getExpenseRoute(expenseId: string) => DolfinRoute | nullWhere "Open the expense" goes; the expense page by default. Return null to hide it.
hideBackLinkbooleanHide the "Back to receipts" link.
classNamestring
sectionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra cards after the lines (e.g. the expense's accounting sync).
fieldsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Extra fields in "What we read".
headerActionsstring | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.Re…Buttons after View file and Read again.

Customisation

Without editing the source, you can change:

Class names
className
Messages
expenses.receipts.detail

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.

useMessages

Files

Written to your app by the install command:

  • components/dolfin/expenses/receipt-detail-page.tsx 56 lines