Feat: Order Controller updates

This commit is contained in:
2026-09-30 19:50:03 +03:00
parent 92016256ce
commit a7cdfbd1cb
6 changed files with 87 additions and 17 deletions
@@ -44,7 +44,11 @@ public function show(string $locale, Request $request, int $orderId): View
return view('account.orders.show', [
'order' => $order,
'paymentMethodName' => $paymentMethodName,
'shipments' => $order->shipments->whereNull('cancelled_at')->whereNotNull('tracking_reference'),
// Active shipments with a number; return vouchers are the shop's
// business, not the customer's.
'shipments' => $order->shipments
->reject(fn ($shipment) => $shipment->isCancelled() || $shipment->isReturn() || blank($shipment->tracking_reference))
->values(),
]);
}
}