feat: group order items by product with category totals

This commit is contained in:
2026-05-14 21:10:54 +02:00
parent 4ad80fa57d
commit 775b9200f5
3 changed files with 213 additions and 75 deletions
@@ -60,7 +60,9 @@ function OrderDetails() {
const location = useLocation();
// commandId = ID global pour l'API (passé en state depuis l'historique)
// fallback sur orderId si navigation directe via URL
const commandId = (location.state as { commandId?: number } | null)?.commandId ?? parseInt(orderId ?? "0");
const commandId =
(location.state as { commandId?: number } | null)?.commandId ??
parseInt(orderId ?? "0");
const [order, setOrder] = useState<OrderDetailsData | null>(null);
const [enrichedProducts, setEnrichedProducts] = useState<