Skip to main content

OrderSummary

Displays a complete order overview including order metadata (number, date, status, total), invoice and delivery addresses, payment/carrier/delivery information, and order remarks. Designed for order detail and order confirmation pages.

Usage

Full order summary with all sections visible (default)

import OrderSummary from '@/components/propeller/OrderSummary';

<OrderSummary order={order} title="Order Summary" />

Minimal view — metadata only, no addresses or delivery info

<OrderSummary
order={order}
title="Order #12345"
showInvoiceAddress={false}
showDeliveryAddress={false}
showDeliveryInfo={false}
showRemarks={false}
/>

Custom price and date formatting with Dutch labels

<OrderSummary
order={order}
formatPrice={(price) => `${price.toFixed(2).replace('.', ',')}`}
formatDate={(dateStr) =>
new Date(dateStr).toLocaleDateString('nl-NL', {
year: 'numeric',
month: 'long',
day: 'numeric',
})
}
labels={{
orderNumber: 'Bestelnummer',
orderDate: 'Besteldatum',
status: 'Status',
total: 'Totaal',
invoiceAddress: 'Factuuradres',
deliveryAddress: 'Afleveradres',
payment: 'Betaling:',
carrier: 'Vervoerder:',
deliveryDate: 'Leverdatum:',
reference: 'Referentie:',
remarks: 'Opmerkingen:',
}}
/>

With country code resolution

import { countries } from '@/data/countries';

<OrderSummary
order={order}
countries={countries}
/>

Quote detail — hide total (shown separately via OrderTotals)

<OrderSummary
order={quote}
title="Quote Details"
showOrderTotal={false}
/>

Configuration

Core

PropTypeRequiredDefaultDescription
orderanyYes--The order object from the Propeller SDK
titlestringNo--Heading rendered above the summary. Omit to hide.
orderSummaryContainerClassstringNo'order-summary'CSS class applied to the root container

Visibility Toggles

All default to true. Set to false to hide the corresponding section.

PropTypeControls
showOrderNumberbooleanOrder number in the metadata row
showOrderDatebooleanOrder date in the metadata row
showOrderStatusbooleanStatus badge in the metadata row
showOrderTotalbooleanTotal price in the metadata row
showInvoiceAddressbooleanInvoice address block
showDeliveryAddressbooleanDelivery address block
showDeliveryInfobooleanPayment method, carrier, and delivery date panel
showRemarksbooleanReference and remarks panel

Formatting and Localization

PropTypeDefaultDescription
formatPrice(price: number) => stringFormats as €X.XXCustom price formatter for the order total
formatDate(dateString: string) => stringen-US long date (e.g., "March 25, 2026")Custom date formatter for order date and delivery date
labelsRecord<string, string>English defaultsOverride any UI label (see Label Keys below)
countries{ code: string; name: string }[][]Country list for resolving ISO codes to display names. When omitted, raw country codes are shown.

Labels

KeyDefault Value
orderNumber"Order Number"
orderDate"Order Date"
status"Status"
total"Total"
invoiceAddress"Invoice Address"
deliveryAddress"Delivery Address"
payment"Payment:"
carrier"Carrier:"
deliveryDate"Delivery Date:"
reference"Reference:"
remarks"Remarks:"

SDK Services

OrderSummary is a read-only component. It does not call any SDK services directly. It receives an Order object (typically fetched via OrderService.getOrder()) and reads the following fields:

Order Fields

Field PathTypeUsed For
order.idnumberOrder number display
order.createdAtstringOrder date, formatted via formatDate
order.statusstringStatus badge (e.g., "NEW", "CONFIRMED", "QUOTATION")
order.total.netnumberOrder total, formatted via formatPrice
order.referencestringCustomer-provided reference
order.remarksstringCustomer-provided remarks/notes

Address Fields (from order.addresses[])

The component filters order.addresses by type to find the invoice (type === 'invoice') and delivery (type === 'delivery') addresses. Each address object is expected to have:

FieldTypeNotes
companystringShown first when present
firstNamestringCombined into a full name line
middleNamestringCombined into a full name line
lastNamestringCombined into a full name line
streetstringCombined with number into a street line
numberstringHouse/building number
numberExtensionstringOptional number suffix
postalCodestringCombined with city
citystringCombined with postal code
countrystringISO country code, resolved via countries prop
emailstringShown in muted text below the address

Payment and Delivery Fields

Field PathTypeUsed For
order.paymentData.methodstringPayment method name
order.postageData.carrierstringCarrier/shipping provider name
order.postageData.requestDatestringRequested delivery date, formatted via formatDate

Behavior

  • Layout: The component renders in four visual sections stacked vertically:

    1. Metadata row -- a responsive grid (1 column on mobile, up to 4 on desktop) showing order number, date, status badge, and total.
    2. Addresses -- a two-column grid with invoice and delivery addresses side by side.
    3. Delivery info panel -- a bordered card showing payment method, carrier, and delivery date as key-value rows. Only rendered when at least one of the three values is present.
    4. Remarks panel -- a bordered card showing reference and remarks as key-value rows. Only rendered when at least one of the two values is present.
  • Conditional rendering: Each section is independently controlled by its visibility prop. Within sections, individual fields are hidden when their data is empty or missing from the order object. The delivery info and remarks panels are fully hidden when all their child values are empty, even if the visibility prop is true.

  • Date formatting: Falls back to en-US long format (toLocaleDateString) when no formatDate prop is provided. If parsing fails, the raw date string is returned as-is.

  • Price formatting: Falls back to prefix with two decimal places when no formatPrice prop is provided. Treats null/undefined prices as 0.

  • Country resolution: When the countries prop is provided, ISO country codes in addresses are resolved to full country names. When omitted or when no match is found, the raw code is displayed.

  • Status badge: The order status is rendered as a pill-shaped badge with bg-secondary/10 and text-secondary styling.