Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Stop a resumed order reporting itself as canceled

Damian Legawiecf48a218ede23
diff --git a/packages/dashboard/src/components/spree/orders/order-summary-card.tsx b/packages/dashboard/src/components/spree/orders/order-summary-card.tsx
index e0de755ea6..23cee62688 100644
--- a/packages/dashboard/src/components/spree/orders/order-summary-card.tsx
+++ b/packages/dashboard/src/components/spree/orders/order-summary-card.tsx
@@ -71,10 +71,15 @@ export function OrderSummaryCard({ order }: { order: Order }) {
/>
)}
- {/* Set apart from the timestamps above: a cancellation is its own
+ {/* Keyed on the status rather than the timestamp: resuming an order
+ puts it back to placed but leaves the cancellation stamps as
+ history, and that history should stop being reported as the order's
+ current state.
+
+ Set apart from the timestamps above: a cancellation is its own
story — when, who, why — and four rows of it run together with the
order's own dates otherwise. */}
- {order.canceled_at && (
+ {order.status === 'canceled' && order.canceled_at && (
<>
<Separator />
<SummaryRow