PlatformOrder views: use model orderTypeLabel mapping

This commit is contained in:
萝卜
2026-03-15 01:43:50 +00:00
parent c81c5a1f39
commit 6bb3c843dd
3 changed files with 8 additions and 5 deletions

View File

@@ -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(),
]);
}