{{-- ═══ صف الترحيب ═══ --}}

مرحباً بك، {{ auth()->user()->name }} 👋

إليك نظرة عامة على أداء متجرك اليوم

| اليوم
{{-- ═══ 5 بطاقات إحصائية — ترتيب RTL من اليمين ═══ --}}
@foreach($stats as $stat)

{{ $stat['title'] }}

{{ $stat['value'] }}{{ $stat['suffix'] }}

@include('admin.components.stat-icons.' . $stat['icon'])

{{ $stat['up'] ? '+' : '-' }}{{ $stat['change'] }}{{ $stat['up'] ? '↑' : '↓' }}

@endforeach
{{-- ═══ مخططات: donut يمين | line يسار ═══ --}}
{{-- الطلبات حسب الحالة — col 1 يمين --}}

الطلبات حسب الحالة

@foreach($orderStatusChart as $item) @if($item['count'] > 0) @php $dot = match($item['color']) { 'emerald' => '#10B981', 'blue' => '#3B82F6', 'violet' => '#8B5CF6', 'orange' => '#F59E0B', 'green' => '#86EFAC', 'red' => '#EF4444', default => '#9CA3AF', }; @endphp
{{ $item['label'] }} {{ $item['count'] }} ({{ $item['percent'] }}%)
@endif @endforeach
{{-- المبيعات — col 2-3 يسار --}}

المبيعات (آخر 7 أيام)

{{-- ═══ 3 جداول: تنبيهات يمين | طلبات وسط | منتجات يسار ═══ --}}
{{-- التنبيهات — col 1 يمين --}}

التنبيهات والإشعارات

@foreach($notifications as $n) @php $box = match($n->icon_color) { 'red' => ['bg' => 'bg-red-50', 'text' => 'text-red-500'], 'orange' => ['bg' => 'bg-orange-50', 'text' => 'text-orange-500'], 'green' => ['bg' => 'bg-emerald-50', 'text' => 'text-emerald-600'], 'blue' => ['bg' => 'bg-blue-50', 'text' => 'text-blue-500'], default => ['bg' => 'bg-gray-50', 'text' => 'text-gray-500'], }; @endphp
@if($n->icon_color === 'red') @elseif($n->icon_color === 'green') @else @endif

{{ $n->title }}

@if($n->message)

{{ $n->message }}

@endif

{{ $n->created_at->diffForHumans() }}

@endforeach
{{-- أحدث الطلبات — col 2 وسط --}}

أحدث الطلبات

@foreach($recentOrders as $order) @php $statusVal = $order->status instanceof \App\Enums\VendorOrderStatus ? $order->status->value : $order->status; $badge = match($statusVal) { 'new' => 'bg-emerald-100 text-emerald-700', 'accepted', 'preparing' => 'bg-blue-100 text-blue-700', 'ready_for_pickup', 'sent_to_branch', 'arrived_to_branch' => 'bg-violet-100 text-violet-700', 'assigned_to_driver', 'out_for_delivery' => 'bg-orange-100 text-orange-700', 'delivered' => 'bg-green-100 text-green-700', 'cancelled', 'failed_delivery', 'returned' => 'bg-red-100 text-red-700', default => 'bg-gray-100 text-gray-600', }; @endphp @endforeach
رقم الطلب العميل الحالة الوقت المبلغ
#{{ $order->order_number }} {{ $order->customer_name }} {{ $order->status->label() }} {{ $order->created_at->diffForHumans() }} {{ number_format($order->total) }} د.ع
{{-- أفضل المنتجات — col 3 يسار --}}

أفضل المنتجات

@foreach($topProducts as $i => $product) @endforeach
# المنتج المبيعات الكمية
{{ $i + 1 }}
{{ mb_substr($product->name, 0, 1) }}
{{ $product->name }}
{{ number_format($product->wholesale_price * $product->sold_count) }} د.ع {{ number_format($product->sold_count) }}