@extends('layouts.account', ['title' => 'لوحة التحكم | RaseedNow']) @section('account_content') @php $walletBalance = ($user->wallet?->balance_minor ?? 0) / 100; $totalOrders = $user->orders->count(); $completedOrders = $user->orders->where('fulfillment_status', 'completed')->count(); $points = (int) ($user->loyalty_points ?? 0); $displayName = $user->display_name ?: $user->name; $dashboardCurrencies = \App\Models\Currency::where('is_active', true)->orderByDesc('is_base')->orderBy('code')->get(); $dashboardCurrencyCode = session('store_currency', 'EGP'); $dashboardCurrency = $dashboardCurrencies->firstWhere('code', $dashboardCurrencyCode) ?: $dashboardCurrencies->first(); $dashboardCurrencyFlags = ['EGP' => 'eg.png', 'USD' => 'us.png', 'EUR' => 'eu.png', 'SAR' => 'sa.png', 'AED' => 'ae.png']; $mobileUnreadCount = $user->customerNotifications()->whereNull('read_at')->count(); $referralUrl = $user->referral_code ? route('register', ['ref' => $user->referral_code]) : route('register'); $fallbackImages = collect(['product-108.webp','product-109.webp','product-110.webp','product-111.webp','product-112.webp']); $statusLabels = [ 'completed' => 'تم التسليم', 'delivered' => 'تم التسليم', 'pending' => 'قيد التنفيذ', 'processing' => 'قيد التنفيذ', 'failed' => 'فشل الدفع', 'cancelled' => 'ملغي', 'refunded' => 'مسترد', 'paid' => 'مدفوع', ]; $statusTone = fn ($status) => match ($status) { 'completed', 'delivered', 'paid' => 'success', 'failed', 'cancelled' => 'danger', 'refunded' => 'warning', default => 'warning', }; $activities = collect() ->merge($recentOrders->map(fn ($order) => [ 'label' => 'طلب جديد '.$order->order_number, 'meta' => $order->created_at?->diffForHumans(), 'tone' => $statusTone($order->fulfillment_status), ])) ->merge($recentNotifications->map(fn ($notification) => [ 'label' => $notification->title, 'meta' => $notification->created_at?->diffForHumans(), 'tone' => $notification->read_at ? 'muted' : 'primary', ])) ->take(5); @endphp
{{ $dashboardCurrency?->symbol ?? 'ج.م' }}
@foreach($dashboardCurrencies as $currency)
@csrf
@endforeach
رصيد المحفظة {{ number_format($walletBalance, 2) }} ج.م +

مرحبًا بك، {{ $displayName }}

جاهز لشحن رصيدك والاستمتاع بألعابك المفضلة

اشحن ألعابك المفضلة بسرعة وأمان

أفضل الأسعار، أسرع شحن، دعم على مدار الساعة
كل ما تحتاجه في مكان واحد

اشحن الآن ϟ

المحفظة

شحن سريع وآمن
لرصيد حسابك

شحن الآن

دعوة الأصدقاء

ادع أصدقاءك واحصل
على نقاط ومكافآت

دعوة الآن

عرض الأسبوع

خصومات تصل حتى 30%
على باقات مختارة

عرض العروض
خصم حتى
30%

آخر الطلبات

عرض الكل
@forelse($recentOrders->take(3) as $order) @php $firstItem = $order->items->first(); $game = $firstItem?->productVariant?->game; $image = $game?->image_path ? asset($game->image_path) : asset('images/kroti/'.$fallbackImages[$loop->index % $fallbackImages->count()]); $status = $order->fulfillment_status ?: $order->payment_status; @endphp {{ $game?->name_en ?: $firstItem?->name_snapshot ?: 'منتج' }} {{ $game?->name_en ?: $game?->name_ar ?: 'طلب #'.$order->order_number }}{{ $firstItem?->name_en ?? $firstItem?->name_snapshot ?? 'منتجات متعددة' }} {{ number_format($order->total_minor / 100, 2) }} {{ $order->currency_code }}{{ $statusLabels[$status] ?? $status }} @empty
لا توجد طلبات بعد.
@endforelse

مرحبًا بك، {{ $displayName }}

جاهز لشحن رصيدك والاستمتاع بألعابك المفضلة

بانر ترحيبي لحساب العميل

مرحبًا بك، {{ $displayName }}

جاهز لشحن رصيدك والاستمتاع بألعابك المفضلة

اشحن ألعابك المفضلة بسرعة وأمان

أفضل الأسعار، أسرع شحن، دعم على مدار الساعة كل ما تحتاجه في مكان واحد

اشحن الآن ϟ
الطلبات المكتملة {{ $completedOrders }} طلب عرض الكل
عرض الأسبوع

عرض الأسبوع

خصومات تصل حتى 30% على باقات مختارة

عرض العروض

طلباتك الأخيرة

عرض الكل
اللعبةالباقةالتاريخالحالةالمبلغ
@forelse($recentOrders as $order) @php $firstItem = $order->items->first(); $game = $firstItem?->productVariant?->game; $image = $game?->image_path ? asset($game->image_path) : asset('images/kroti/'.$fallbackImages[$loop->index % $fallbackImages->count()]); $status = $order->fulfillment_status ?: $order->payment_status; @endphp {{ $game?->name_ar ?: $firstItem?->name_snapshot ?: 'منتج' }}{{ $game?->name_ar ?: 'طلب #'.$order->order_number }} {{ $firstItem?->name_snapshot ?: 'منتجات متعددة' }} {{ $order->created_at?->format('Y-m-d H:i') }} {{ $statusLabels[$status] ?? $status }} {{ number_format($order->total_minor / 100, 2) }} {{ $order->currency_code }} @empty
لا توجد طلبات بعد. ابدأ أول عملية شحن الآن.
@endforelse

النشاط الأخير

@forelse($activities as $activity)
{{ $activity['label'] }} {{ $activity['meta'] }}
@empty
لا يوجد نشاط حديث.
@endforelse

ألعابك المفضلة

عرض الكل
@forelse($user->favoriteGames->take(5) as $game) @php($image = $game->image_path ? asset($game->image_path) : asset('images/kroti/'.$fallbackImages[$loop->index % $fallbackImages->count()])) {{ $game->name_ar }} {{ $game->name_ar }} @empty
أضف ألعابك المفضلة لتظهر هنا.
@endforelse
شحن فوري وآمن توصيل فوري وآمن 100% أفضل الأسعار نضمن لك السعر الأفضل دعم على مدار الساعة فريق دعم متاح 24/7 طرق دفع متعددة اختر طريقة الدفع المناسبة لك
@endsection {{-- Legacy mobile geometry overrides are intentionally disabled. The dashboard now uses the isolated rn-mobile-dashboard implementation above so CSS and runtime JS cannot conflict. @push('styles') @endpush @push('styles') @endpush @push('scripts') @endpush --}}