@stack('styles') @auth @include('partials.daily-reading-footer') @endauth @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; try { $unreadTipsCount = \App\Models\AdvisorTip::where('recipient_id', auth()->id())->where('is_read', false)->count(); } catch (\Exception $e) { $unreadTipsCount = 0; } $unreadManualNotificationsCount = 0; try { if (class_exists('App\Models\ManualNotification') && \Illuminate\Support\Facades\Schema::hasTable('manual_notifications')) { if (\Illuminate\Support\Facades\Schema::hasColumn('manual_notifications', 'is_read')) { $unreadManualNotificationsCount = \App\Models\ManualNotification::where('is_read', false)->count(); } elseif (\Illuminate\Support\Facades\Schema::hasColumn('manual_notifications', 'read_at')) { $unreadManualNotificationsCount = \App\Models\ManualNotification::whereNull('read_at')->count(); } elseif (\Illuminate\Support\Facades\Schema::hasColumn('manual_notifications', 'read')) { $unreadManualNotificationsCount = \App\Models\ManualNotification::where('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
@if($siteLogo)
{{ $siteName }}
@endif
{{-- إدراج الـ dropdown هنا --}}
@include('member.messages.partials.messages-dropdown')
@if($unreadTipsCount > 0) {{ $unreadTipsCount > 9 ? '9+' : $unreadTipsCount }} @endif
{{-- Dropdown --}} @include('member.partials.member-hub')
{{-- الإشعارات العامة (دروب داون) --}}
{{-- القائمة (دروب داون ثابت على الموبايل) --}}
@if($testsCount > 0) {{ $testsCount }} @endif
{{-- سكربت الإشعارات (كما هو معتمد عندك) --}} @push('scripts') @endpush
@if (session('success'))

{{ session('success') }}

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

{{ session('error') }}

@endif @yield('content')
@stack('scripts') @include('partials.notifications-js') @stack('scripts')
نقاطك: {{ number_format(auth()->user()->total_points) }}