@php $adminUser = auth()->user(); $siteSettings = \App\Models\SiteSetting::current(); $adminLocale = app()->getLocale() === 'en' ? 'en' : 'ar'; $isAdminEnglish = $adminLocale === 'en'; $siteName = $siteSettings->site_name_ar ?: 'RaseedNow'; $siteLogo = $siteSettings->logo_path ?: 'images/brand/raseednow-logo.png'; $t = [ 'admin' => $isAdminEnglish ? 'Admin' : 'الإدارة', 'pro_panel' => $isAdminEnglish ? 'Professional admin panel' : 'لوحة إدارة احترافية', 'search' => $isAdminEnglish ? 'Search orders, customers and references...' : 'ابحث في الطلبات والعملاء والمراجع...', 'theme' => $isAdminEnglish ? 'Theme' : 'الوضع', 'language' => $isAdminEnglish ? 'Language' : 'اللغة', 'dashboard' => $isAdminEnglish ? 'Dashboard' : 'لوحة التحكم', 'store_settings' => $isAdminEnglish ? 'Store settings' : 'إعدادات المتجر', 'system_health' => $isAdminEnglish ? 'System health' : 'صحة النظام', 'logout' => $isAdminEnglish ? 'Logout' : 'تسجيل الخروج', ]; $adminNavGroups = [ ($isAdminEnglish ? 'Main' : 'الرئيسية') => [ ['section' => 'dashboard', 'label' => $isAdminEnglish ? 'Dashboard' : 'لوحة التحكم', 'route' => 'admin.dashboard', 'match' => 'admin.dashboard', 'icon' => 'M4 13h6V4H4v9Zm10 7h6V4h-6v16ZM4 20h6v-4H4v4Zm10-7h6v-3h-6v3Z'], ['section' => 'analytics', 'label' => $isAdminEnglish ? 'Analytics' : 'التحليلات', 'route' => 'admin.analytics.index', 'match' => 'admin.analytics.*', 'icon' => 'M5 19V5m0 14h14M9 16V9m4 7V7m4 9v-4'], ['section' => 'customers', 'label' => $isAdminEnglish ? 'Customers' : 'العملاء', 'route' => 'admin.customers.index', 'match' => 'admin.customers.*', 'icon' => 'M16 11a4 4 0 1 0-8 0m8 0a4 4 0 1 1-8 0M4 21a8 8 0 0 1 16 0'], ], ($isAdminEnglish ? 'Sales' : 'المبيعات') => [ ['section' => 'orders', 'label' => $isAdminEnglish ? 'Orders' : 'الطلبات', 'route' => 'admin.orders.index', 'match' => 'admin.orders.*', 'icon' => 'M7 4h10l2 4v12H5V8l2-4Zm0 4h10M9 12h6M9 16h4'], ['section' => 'marketing', 'label' => $isAdminEnglish ? 'Coupons & live' : 'الكوبونات والبث', 'route' => 'admin.coupons.index', 'match' => 'admin.coupons.*|admin.vouchers.*|admin.marketing.*|admin.banners.*', 'icon' => 'M5 15h3l8-8v10l-8-2H5v-4Zm13-5 2-2m-2 8 2 2'], ['section' => 'finance', 'label' => $isAdminEnglish ? 'Finance' : 'المالية', 'route' => 'admin.finance.index', 'match' => 'admin.finance.*|admin.manual-payments.*', 'icon' => 'M4 7h16v10H4V7Zm0 4h16M8 15h3m5 0h.01'], ['section' => 'finance', 'label' => $isAdminEnglish ? 'Wallet transfers' : 'تحويلات الرصيد', 'route' => 'admin.wallet-transfers.index', 'match' => 'admin.wallet-transfers.*', 'icon' => 'M7 7h10m0 0-3-3m3 3-3 3M17 17H7m0 0 3 3m-3-3 3-3'], ], ($isAdminEnglish ? 'Catalog' : 'الكتالوج') => [ ['section' => 'products', 'label' => $isAdminEnglish ? 'Products' : 'المنتجات', 'route' => 'admin.products.index', 'match' => 'admin.products.*', 'icon' => 'M12 3 4 7v10l8 4 8-4V7l-8-4Zm0 8 8-4M12 11 4 7m8 4v10'], ['section' => 'games', 'label' => $isAdminEnglish ? 'Games' : 'الألعاب', 'route' => 'admin.games.index', 'match' => 'admin.games.*', 'icon' => 'M7 9h10l3 7a3 3 0 0 1-5 3l-1.5-1.5h-3L9 19a3 3 0 0 1-5-3l3-7Zm2 4h3m-1.5-1.5v3M16 13h.01'], ['section' => 'categories', 'label' => $isAdminEnglish ? 'Categories' : 'الأقسام', 'route' => 'admin.categories.index', 'match' => 'admin.categories.*', 'icon' => 'M4 4h7v7H4V4Zm9 0h7v7h-7V4ZM4 13h7v7H4v-7Zm9 0h7v7h-7v-7Z'], ['section' => 'stock', 'label' => $isAdminEnglish ? 'Stock' : 'المخزون', 'route' => 'admin.stock-codes.index', 'match' => 'admin.stock-codes.*', 'icon' => 'M7 4h10v16H7V4Zm3 4h4m-4 4h4m-4 4h2'], ], ($isAdminEnglish ? 'Growth' : 'النمو') => [ ['section' => 'support', 'label' => $isAdminEnglish ? 'Support' : 'الدعم', 'route' => 'admin.support-tickets.index', 'match' => 'admin.support-tickets.*', 'icon' => 'M4 5h16v10H8l-4 4V5Zm5 5h6m-6 3h4'], ['section' => 'reports', 'label' => $isAdminEnglish ? 'Reports' : 'التقارير', 'route' => 'admin.reports.index', 'match' => 'admin.reports.*', 'icon' => 'M6 20V4h12v16H6Zm3-4h6M9 12h6M9 8h6'], ], ($isAdminEnglish ? 'System' : 'النظام') => [ ['section' => 'system', 'label' => $isAdminEnglish ? 'System health' : 'صحة النظام', 'route' => 'admin.system.index', 'match' => 'admin.system.*', 'icon' => 'M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3Zm-3 9 2 2 4-5'], ['section' => 'providers', 'label' => $isAdminEnglish ? 'Providers' : 'مزودو الشحن', 'route' => 'admin.providers.index', 'match' => 'admin.providers.*', 'icon' => 'M5 12h4l2-7 2 14 2-7h4M4 20h16M4 4h16'], ['section' => 'settings', 'label' => $isAdminEnglish ? 'Settings' : 'الإعدادات', 'route' => 'admin.settings.edit', 'match' => 'admin.settings.*', 'icon' => 'M12 15.5A3.5 3.5 0 1 0 12 8a3.5 3.5 0 0 0 0 7.5Zm0-12v2m0 13v2m8.5-8.5h-2m-13 0h-2m14.5-6-1.4 1.4m-9.2 9.2-1.4 1.4m0-12 1.4 1.4m9.2 9.2 1.4 1.4'], ['section' => 'staff', 'label' => $isAdminEnglish ? 'Staff permissions' : 'الموظفون والصلاحيات', 'route' => 'admin.staff.index', 'match' => 'admin.staff.*', 'icon' => 'M16 7a4 4 0 1 0-8 0 4 4 0 0 0 8 0ZM4 21a8 8 0 0 1 16 0m-4-6 2 2 3-4'], ['section' => 'system', 'label' => $isAdminEnglish ? 'Activity log' : 'سجل النشاط', 'route' => 'admin.audit-logs.index', 'match' => 'admin.audit-logs.*', 'icon' => 'M6 4h12v16H6V4Zm3 4h6M9 12h6M9 16h4'], ], ]; $adminNavGroups = collect($adminNavGroups) ->map(fn ($items) => collect($items)->filter(fn ($item) => $adminUser?->canAccessAdminSection($item['section']))->values()) ->filter(fn ($items) => $items->isNotEmpty()); @endphp {{ $title ?? 'RaseedNow Admin' }} @vite(['resources/css/admin-saas.css', 'resources/js/admin.js'])
{{ $siteName }} {{ $t['admin'] }}
@csrf
{{ mb_strtoupper(mb_substr($adminUser?->display_name ?: $adminUser?->name ?: 'A', 0, 1)) }} {{ $adminUser?->display_name ?: $adminUser?->name ?: 'Admin' }}
@if(session('status'))
{{ session('status') }}
@endif @yield('content')