{{-- resources/views/layouts/advisor.blade.php --}} @yield('title', 'لوحة مستشار التيم - نظام فريق الوفاء الذهبي') @stack('styles') @php $linkBase = 'nav-link flex items-center gap-3 px-4 py-2.5 text-sm rounded-lg transition-colors'; @endphp @auth @include('partials.daily-reading-footer') @endauth {{-- Messenger Chat Widget --}} @auth @include('partials.private') @endauth
@php $siteLogo = \App\Models\SystemSetting::get('site_logo'); $siteName = \App\Models\SystemSetting::get('site_name', 'فريق الوفاء الذهبي'); // إشعارات يدوية (من جدول notification_recipients) $unreadManualNotificationsCount = 0; $unreadMessagesCount = 0; try { if (Schema::hasTable('notification_recipients')) { $unreadManualNotificationsCount = \App\Models\NotificationRecipient::where('user_id', auth()->id()) ->where('read', false) ->whereHas('notification', function($q) { $q->where('status', 'sent'); }) ->count(); } } catch (Exception $e) {} // إشعارات عامة $recentNotifications = \App\Http\Controllers\General\GeneralNotificationController::getRecentNotifications(); $unreadNotificationsCount = \App\Http\Controllers\General\GeneralNotificationController::getUnreadNotificationsCount(); // الاختبارات use App\Helpers\TestHelper; $testsCount = TestHelper::countAvailableTests(); @endphp
{{-- يسار الهيدر: زر القائمة + الشعار + عنوان الصفحة --}}
{{-- زر القائمة للموبايل --}} {{-- الشعار --}} @if($siteLogo)
{{ $siteName }}
@endif {{-- العنوان + سطر تعريفي --}}

@yield('page-title', 'لوحة المستشار')

مرحباً بك في نظام {{ $siteName }} — هنا تتابع الأعضاء، الملفات، والتحليلات اليومية.

{{-- يمين الهيدر: أيقونات + الوقت --}}
{{-- شريط الأيقونات --}}
{{-- أيقونة الرسائل الخاصة --}}
{{-- إدراج الـ dropdown هنا --}}
@include('member.messages.partials.messages-dropdown')
{{-- الإشعارات اليدوية --}} @if($unreadManualNotificationsCount > 0) {{ $unreadManualNotificationsCount > 9 ? '9+' : $unreadManualNotificationsCount }} @endif {{-- الإشعارات الأوتوماتيكية --}}
{{-- Dropdown (متمركز على الموبايل – ملاصق للأيقونة على الشاشات الكبيرة) --}}
{{-- الاختبارات المتاحة --}} @if($testsCount > 0) {{ $testsCount }} @endif
{{-- الوقت الحالي --}}
@if (session('success'))

{{ session('success') }}

@endif @if (session('error'))

{{ session('error') }}

@endif @yield('content')
@push('scripts') @endpush @stack('scripts')