From 51a53851de73e28f1315a7c971df1afbc4fd0ef2 Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 30 Aug 2026 22:26:50 +0200 Subject: [PATCH] feat(orders): render order-number and item-duplicate pills --- src/app/(app)/orders/page.tsx | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/app/(app)/orders/page.tsx b/src/app/(app)/orders/page.tsx index 44b6fe0..b321ff6 100644 --- a/src/app/(app)/orders/page.tsx +++ b/src/app/(app)/orders/page.tsx @@ -755,6 +755,50 @@ function OrderCard({ {order.potential_delivery_note_number} )} + {/* Order-number-duplicate pill — set by + suggestOrderNumberDuplicate when another order (any + status, no time limit) shares this exact order_number. + Red — this is the one most likely to indicate an + actual accident (a repeated internal ORD- number, or + an operator not realizing a PO was already entered), + as opposed to the item-duplicate pill below which is + routinely legitimate (split PO deliveries). */} + {order.order_number_duplicate && ( + + Dup # + + )} + {/* Item-duplicate pill — set by suggestOrderDuplicate when + this order's line items exactly match another order + for the same company within the last 60 days, + regardless of status. Amber, distinct from the DN + pill's blue (a repeat ORDER, not a repeat DELIVERY) + and from the order-number pill's red (this one is + routinely legitimate — a customer re-ordering the + same basket — not necessarily a mistake). */} + {order.potential_duplicate_order_number && ( + + Dup of {order.potential_duplicate_order_number} + + )} {complete && } ·