{{-- resources/views/general/notifications/all.blade.php --}} @php $user = auth()->user(); if ($user->hasRole('super-admin')) { $layout = 'layouts.superadmin'; } elseif ($user->hasRole('advisor')) { $layout = 'layouts.advisor'; } elseif ($user->hasRole('moderator')) { $layout = 'layouts.moderator'; } else { $layout = 'layouts.member'; } $unreadCount = $unreadNotifications->count(); @endphp @extends($layout) @section('title', 'الإشعارات العامة') @section('page-title', 'الإشعارات العامة') @section('content')
{{-- هيدر / هيرو --}}
{{-- جلو خلفي --}}
مركز الإشعارات العامة للنظام

الإشعارات العامة

هنا ستجد كل الإشعارات الإدارية والأنظمة الهامة المرتبطة بحسابك في نظام فريق الوفاء الذهبي. يمكنك متابعة ما هو جديد وتعليم الإشعارات كمقروءة أو مراجعة القديم منها.

هنا ستجد كل الإشعارات الإدارية والأنظمة الهامة المرتبطة بحسابك في نظام فريق الوفاء الذهبي. يمكنك متابعة ما هو جديد وتعليم الإشعارات كمقروءة أو مراجعة القديم منها.

{{-- إحصائيات سريعة --}}

غير مقروءة

{{ $unreadCount }} إشعار

إجمالي الإشعارات

{{ $unreadNotifications->count() + $readNotifications->total() }}
@csrf
{{-- المحتوى الرئيسي --}}
{{-- الإشعارات غير المقروءة --}}

الإشعارات غير المقروءة {{ $unreadCount }}

@if($unreadNotifications->isEmpty())

لا توجد إشعارات غير مقروءة حالياً 🎉

@else
@foreach($unreadNotifications as $notification)
{{-- أيقونة حسب النوع --}}
@php switch ($notification->type) { case 'success': $iconBg = 'bg-emerald-100 dark:bg-emerald-900/40 text-emerald-700 dark:text-emerald-300'; $icon = 'fa-solid fa-circle-check'; break; case 'warning': $iconBg = 'bg-yellow-100 dark:bg-yellow-900/40 text-yellow-700 dark:text-yellow-300'; $icon = 'fa-solid fa-triangle-exclamation'; break; case 'danger': $iconBg = 'bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300'; $icon = 'fa-solid fa-circle-xmark'; break; default: $iconBg = 'bg-sky-100 dark:bg-sky-900/40 text-sky-700 dark:text-sky-300'; $icon = 'fa-solid fa-info'; break; } @endphp

{{ $notification->message }}

{{ $notification->created_at->diffForHumans() }}

@if ($notification->action_url) عرض التفاصيل @endif
@csrf
@endforeach
@endif
{{-- الإشعارات المقروءة (مع صفحة) --}}

الإشعارات السابقة (المقروءة)

@if($readNotifications->isEmpty())
لا توجد إشعارات مقروءة بعد.
@else
@foreach($readNotifications as $notification)
{{-- نقطة حالة --}}

{{ $notification->message }}

تم القراءة منذ {{ $notification->updated_at?->diffForHumans() ?? $notification->created_at->diffForHumans() }} {{ $notification->created_at->format('Y-m-d H:i') }} @if ($notification->action_url) عرض @endif
@endforeach
{{-- الباجيناشن --}}
{{ $readNotifications->onEachSide(1)->links() }}
@endif
@endsection