From a684628dadfeba45110594d6f3135d98e6aa7e4a Mon Sep 17 00:00:00 2001 From: sky121113 Date: Thu, 14 May 2026 16:51:21 +0800 Subject: [PATCH] =?UTF-8?q?[STYLE]=20=E5=84=AA=E5=8C=96=E5=84=80=E8=A1=A8?= =?UTF-8?q?=E6=9D=BF=E6=A9=9F=E5=8F=B0=E5=88=97=E8=A1=A8=E4=BA=92=E5=8B=95?= =?UTF-8?q?=E9=AB=94=E9=A9=97=E8=88=87=E5=BA=AB=E5=AD=98=E5=B0=8E=E8=88=AA?= =?UTF-8?q?=E9=82=8F=E8=BC=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 移除儀表板機台狀態表格中不直觀的「操作」(眼睛圖標) 欄位,簡化介面。 2. 將「運行狀態」與「下位機狀態」文字區域改為可點擊連結,導向至機台列表並自動帶入序號篩選。 3. 將「目前庫存」進度條改為可點擊連結,並優化跳轉邏輯改用 machine_id 參數。 4. 優化行動版介面,移除冗餘的「Inventory Overview」按鈕,改為直接點擊庫存進度條即可跳轉。 --- resources/views/admin/dashboard.blade.php | 235 +++++++++++----------- 1 file changed, 113 insertions(+), 122 deletions(-) diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index 909a60d..d9cfe5c 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -197,7 +197,6 @@ {{ __('Today Cumulative Sales') }} {{ __('Current Stock') }} {{ __('Last Signal') }} - {{ __('Actions') }} @@ -217,98 +216,94 @@ - @php $cStatus = $machine->calculated_status; @endphp -
- @if($cStatus === 'online') -
-
- - + + @php $cStatus = $machine->calculated_status; @endphp +
+ @if($cStatus === 'online') +
+
+ + +
+ {{ __('Online') }} + @if($machine->is_unstable) +
+ + + +
+ @endif
- {{ __('Online') }} - @if($machine->is_unstable) -
- - - + @elseif($cStatus === 'warning') +
+
+ {{ __('Warning') }} +
+ @elseif($cStatus === 'error') +
+
+ {{ __('Error') }} +
+ @else +
+
+ {{ __('Offline') }}
@endif + @if($machine->latest_status_log_time && in_array($cStatus, ['error', 'warning'])) + {{ $machine->latest_status_log_time->diffForHumans() }} + @endif
- @elseif($cStatus === 'warning') -
-
- {{ __('Warning') }} -
- @elseif($cStatus === 'error') -
-
- {{ __('Error') }} -
- @else -
-
- {{ __('Offline') }} -
- @endif - @if($machine->latest_status_log_time && in_array($cStatus, ['error', 'warning'])) - {{ $machine->latest_status_log_time->diffForHumans() }} - @endif -
+
- @php $hStatus = $machine->hardware_status; @endphp -
- + $ {{ number_format($machine->today_sales_sum ?? 0, 0) }} - @php - $stockSum = (float)($machine->slots_sum_stock ?? 0); - $maxStockSum = (float)($machine->slots_sum_max_stock ?? 0); - $stockPercentage = $maxStockSum > 0 ? round(($stockSum / $maxStockSum) * 100, 1) : 0; - $barColor = $stockPercentage < 20 ? 'bg-rose-500' : ($stockPercentage < 50 ? 'bg-amber-500' : 'bg-emerald-500'); - $textColor = str_replace('bg-', 'text-', $barColor); - @endphp -
- +
{{ $machine->last_heartbeat_at ? $machine->last_heartbeat_at->format('Y-m-d H:i:s') : '---' }}
- - - - - - - - @empty @@ -376,38 +371,42 @@
@@ -419,31 +418,23 @@
-
- @php - $stockSum = (float)($machine->slots_sum_stock ?? 0); - $maxStockSum = (float)($machine->slots_sum_max_stock ?? 0); - $stockPercentage = $maxStockSum > 0 ? round(($stockSum / $maxStockSum) * 100, 1) : 0; - $barColor = $stockPercentage < 20 ? 'bg-rose-500' : ($stockPercentage < 50 ? 'bg-amber-500' : 'bg-emerald-500'); - @endphp -
-

{{ __('Current Stock') }}

- {{ $stockPercentage }}% -
-
-
-
+ - - - - - - - - {{ __('Inventory Overview') }} -
@empty