generated from boboko/starter
Feat: Order Controller updates
This commit is contained in:
@@ -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(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user