@extends('layouts.dashboard') @section('content') @php /** * Vendor → Orders → one order. Thin wrapper: the owner's back bar over the * shared order-detail body (partials/order-detail-body.php), which the admin * order page renders too. The view-model is assembled by App\Services\OrderDetail. * * @var array $order @var array $items @var array $journey @var array $journeyStats * @var array|null $customer @var string $driverName @var array|null $restaurant @var array|null $deliveryRoute */ $paid = ($order['payment_status'] ?? '') === 'paid'; $refundable = []; foreach ($items as $it) { $rem = (int) ($it['quantity'] ?? 0) - (int) ($it['refunded_qty'] ?? 0); if ($rem > 0) { $refundable[] = $it + ['remaining' => $rem]; } } $showRefund = !empty($canRefund) && $paid && $refundable; @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp