@php $linkBase = 'nav-link flex items-center gap-3 px-4 py-2.5 text-sm rounded-lg transition'; $onAiAnalyticsUser = request()->routeIs('ai.analytics.user.report'); $unreadMessagesCount = 0; @endphp @stack('styles') @auth @include('partials.daily-reading-footer') @endauth {{-- Messenger Chat Widget --}} @auth @include('partials.private') @endauth
@php use App\Helpers\TestHelper; $siteLogo = \App\Models\SystemSetting::get('site_logo'); $siteName = \App\Models\SystemSetting::get('site_name', 'فريق الوفاء الذهبي'); // النصائح + الإشعارات اليدوية $unreadTipsCount = 0; $unreadManualNotificationsCount = 0; $unreadMessagesCount = 0; try { if (Schema::hasTable('advisor_tips') && Schema::hasColumn('advisor_tips', 'recipient_id') && Schema::hasColumn('advisor_tips', 'is_read')) { $unreadTipsCount = \App\Models\AdvisorTip::where('recipient_id', auth()->id()) ->where('is_read', false) ->count(); } } catch (Exception $e) { $unreadTipsCount = 0; } try { if (Schema::hasTable('manual_notifications') && Schema::hasColumn('manual_notifications', 'is_read')) { $unreadManualNotificationsCount = \App\Models\ManualNotification::where('is_read', false)->count(); } } catch (Exception $e) { $unreadManualNotificationsCount = 0; } // الإشعارات العامة $recentNotifications = \App\Http\Controllers\General\GeneralNotificationController::getRecentNotifications(); $unreadNotificationsCount = \App\Http\Controllers\General\GeneralNotificationController::getUnreadNotificationsCount(); // الاختبارات المتاحة $testsCount = TestHelper::countAvailableTests(); @endphp
{{-- يسار الهيدر: الوقت والتاريخ --}}
{{-- Time/Date Panel --}} {{-- زر القائمة للموبايل --}} {{-- الشعار --}} @if($siteLogo)
{{ $siteName }}
@endif {{-- عنوان الصفحة + سطر ترحيبي --}}
{{-- يمين الهيدر: أيقونات سريعة + النقاط --}}
{{-- شريط الأيقونات --}}
{{-- أيقونة الرسائل الخاصة --}}
{{-- إدراج الـ dropdown هنا --}}
@include('member.messages.partials.messages-dropdown')
{{-- النصائح المقدمة لي --}} @if($unreadTipsCount > 0) {{ $unreadTipsCount > 9 ? '9+' : $unreadTipsCount }} @endif {{-- الإشعارات اليدوية --}}
{{-- Hub Dropdown --}} @include('moderator.partials.moderator-hub')
{{-- الإشعارات العامة (دروب داون) --}}
{{-- القائمة (دروب داون ثابت على الموبايل) --}}
{{-- الاختبارات المتاحة --}} @if($testsCount > 0) {{ $testsCount }} @endif
{{-- JavaScript لتحديث الوقت --}} {{-- سكربت الإشعارات --}} @push('scripts') @endpush
@yield('content')
{{-- 🌟 Dock نقاطك - ثابت أسفل الشاشة --}}
{{-- النص --}} نقاطك: {{ number_format(auth()->user()->total_points) }} {{-- أيقونة النجمة --}}
@stack('scripts')