PlatformOrder views: use model orderTypeLabel mapping
This commit is contained in:
@@ -78,7 +78,8 @@ class PlatformOrderController extends Controller
|
||||
'plans' => $plans,
|
||||
'siteSubscription' => $siteSubscription,
|
||||
'billingCycleLabels' => $this->billingCycleLabels(),
|
||||
'orderTypeLabels' => $this->orderTypeLabels(),
|
||||
// order_type label 映射已下沉到 PlatformOrder::orderTypeLabel();这里不再透传 orderTypeLabels
|
||||
// 'orderTypeLabels' => $this->orderTypeLabels(),
|
||||
'defaults' => $defaults,
|
||||
]);
|
||||
}
|
||||
@@ -335,7 +336,8 @@ class PlatformOrderController extends Controller
|
||||
->values(),
|
||||
'statusLabels' => $this->statusLabels(),
|
||||
'paymentStatusLabels' => $this->paymentStatusLabels(),
|
||||
'orderTypeLabels' => $this->orderTypeLabels(),
|
||||
// order_type label 映射已下沉到 PlatformOrder::orderTypeLabel();这里不再透传 orderTypeLabels
|
||||
// 'orderTypeLabels' => $this->orderTypeLabels(),
|
||||
'summaryStats' => [
|
||||
'total_orders' => (clone $baseQuery)->count(),
|
||||
'paid_orders' => (clone $baseQuery)->where('payment_status', 'paid')->count(),
|
||||
@@ -462,7 +464,8 @@ class PlatformOrderController extends Controller
|
||||
'order' => $order,
|
||||
'statusLabels' => $this->statusLabels(),
|
||||
'paymentStatusLabels' => $this->paymentStatusLabels(),
|
||||
'orderTypeLabels' => $this->orderTypeLabels(),
|
||||
// order_type label 映射已下沉到 PlatformOrder::orderTypeLabel();这里不再透传 orderTypeLabels
|
||||
// 'orderTypeLabels' => $this->orderTypeLabels(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1126,7 +1126,7 @@
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-optional">
|
||||
{{ $orderTypeLabels[$order->order_type] ?? $order->order_type }}
|
||||
{{ $order->orderTypeLabel() }}
|
||||
<div class="muted muted-xs">{{ $order->order_type }}</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>订单类型</th>
|
||||
<td>{{ $orderTypeLabels[$order->order_type] ?? $order->order_type }} <span class="muted">({{ $order->order_type }})</span></td>
|
||||
<td>{{ $order->orderTypeLabel() }} <span class="muted">({{ $order->order_type }})</span></td>
|
||||
</tr>
|
||||
<tr><th>订单状态</th><td>{{ $statusLabels[$order->status] ?? $order->status }} <span class="muted">({{ $order->status }})</span></td></tr>
|
||||
<tr><th>支付状态</th><td>{{ $paymentStatusLabels[$order->payment_status] ?? $order->payment_status }} <span class="muted">({{ $order->payment_status }})</span></td></tr>
|
||||
|
||||
Reference in New Issue
Block a user