diff --git a/resources/views/admin/ads/index.blade.php b/resources/views/admin/ads/index.blade.php index 0e0cae0..c9d601a 100644 --- a/resources/views/admin/ads/index.blade.php +++ b/resources/views/admin/ads/index.blade.php @@ -112,36 +112,51 @@ $baseRoute = 'admin.data-config.advertisements';
- - - - +
+ + + + +
@if(auth()->user()->isSystemAdmin()) - +
+ +
@endif
- - + + + +
diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index f3edbc9..4059996 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -201,6 +201,9 @@ {{ __('Alert Summary') }} + + {{ __('Actions') }} @@ -262,17 +265,38 @@ @endif - $ 0 + $ {{ 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; + + // 顏色與標籤判定 (Color & Label Determination) + $barColor = 'bg-emerald-500'; + $shadowColor = 'shadow-[0_0_8px_rgba(16,185,129,0.4)]'; + $textColor = 'text-emerald-500'; + $statusLabel = __('Healthy'); + + if ($stockPercentage < 20) { + $barColor = 'bg-rose-500'; + $shadowColor = 'shadow-[0_0_8px_rgba(244,63,94,0.4)]'; + $textColor = 'text-rose-500'; + $statusLabel = __('Low Stock'); + } elseif ($stockPercentage < 50) { + $barColor = 'bg-amber-500'; + $shadowColor = 'shadow-[0_0_8px_rgba(245,158,11,0.4)]'; + $textColor = 'text-amber-500'; + $statusLabel = __('Warning'); + } + @endphp
-
-
+
+
- 15.5% {{ - __('Low Stock') }} + {{ $stockPercentage }}%
@@ -287,6 +311,13 @@ class="text-[11px] font-bold text-slate-400/30 dark:text-slate-500 uppercase tracking-widest group-hover:text-slate-400 transition-colors">{{ __('No alert summary') }} + + + {{ __('Inventory Overview') }} + + @empty diff --git a/resources/views/admin/data-config/accounts.blade.php b/resources/views/admin/data-config/accounts.blade.php index 3931ffa..3ddae01 100644 --- a/resources/views/admin/data-config/accounts.blade.php +++ b/resources/views/admin/data-config/accounts.blade.php @@ -135,14 +135,34 @@ $roleSelectConfig = [
@if(auth()->user()->isSystemAdmin()) -
- +
+
@endif - + + +
@@ -254,14 +274,34 @@ $roleSelectConfig = [
@if(auth()->user()->isSystemAdmin()) -
+
@endif - + + +
diff --git a/resources/views/admin/machines/index.blade.php b/resources/views/admin/machines/index.blade.php index ceff271..3592823 100644 --- a/resources/views/admin/machines/index.blade.php +++ b/resources/views/admin/machines/index.blade.php @@ -203,7 +203,7 @@
-

{{ __('Loading Data') }}...

+

{{ __('Loading Data') }}...

-
+ - - - - +
+ + + + + + + +
+ + + + +
@@ -359,36 +383,22 @@
- +
diff --git a/resources/views/admin/machines/permissions.blade.php b/resources/views/admin/machines/permissions.blade.php index bd92ae9..4a00ee8 100644 --- a/resources/views/admin/machines/permissions.blade.php +++ b/resources/views/admin/machines/permissions.blade.php @@ -170,11 +170,31 @@ @if(auth()->user()->isSystemAdmin())
+ :placeholder="__('All Companies')" />
@endif - + + +
diff --git a/resources/views/admin/products/partials/tab-categories.blade.php b/resources/views/admin/products/partials/tab-categories.blade.php index c552192..a84acb5 100644 --- a/resources/views/admin/products/partials/tab-categories.blade.php +++ b/resources/views/admin/products/partials/tab-categories.blade.php @@ -11,7 +11,7 @@ @if(auth()->user()->isSystemAdmin()) -
+
@endif + + + + +
diff --git a/resources/views/admin/products/partials/tab-products.blade.php b/resources/views/admin/products/partials/tab-products.blade.php index 93d8624..0cc1cd0 100644 --- a/resources/views/admin/products/partials/tab-products.blade.php +++ b/resources/views/admin/products/partials/tab-products.blade.php @@ -17,12 +17,39 @@ @if(auth()->user()->isSystemAdmin()) -
+
@endif +
+ +
+ + + + + + diff --git a/resources/views/admin/remote/partials/tab-machines.blade.php b/resources/views/admin/remote/partials/tab-machines.blade.php index fbf699b..9c2e7c3 100644 --- a/resources/views/admin/remote/partials/tab-machines.blade.php +++ b/resources/views/admin/remote/partials/tab-machines.blade.php @@ -16,8 +16,9 @@
@forelse($machines as $machine) - - + @empty
+
@if($machine->image_urls && isset($machine->image_urls[0])) @@ -91,13 +92,24 @@
- +
+ + + + + + + +