@extends('layouts.superadmin') @section('title', 'إدارة الإشعارات') @section('content')

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

إدارة وإرسال الإشعارات اليدوية للأعضاء

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

{{ $stats['total'] }}

المُرسلة

{{ $stats['sent'] }}

المسودات

{{ $stats['draft'] }}

اليوم

{{ $stats['today'] }}

هذا الأسبوع

{{ $stats['this_week'] }}

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

@forelse($notifications as $notification)
{{-- Header --}}

{{ Str::limit($notification->title, 60) }}

{{-- نوع المستلمين --}} @php $typeColors = [ 'all' => 'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300', 'moderators' => 'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300', 'official_members' => 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300', 'beta_members' => 'bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300', 'specific_users' => 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900/30 dark:text-indigo-300' ]; $typeColor = $typeColors[$notification->recipient_type] ?? 'bg-gray-100 text-gray-800'; @endphp {{ $notification->recipient_type_text }} @if($notification->recipient_type === 'specific_users' && $notification->recipient_data) ({{ count($notification->recipient_data) }} أشخاص) @endif {{-- الحالة --}} @if($notification->status === 'sent') مُرسل @else مسودة @endif
{{-- Content Grid --}}
{{-- إحصائيات القراءة --}}

إحصائيات القراءة

@if($notification->status === 'sent') @php $readCount = $notification->read_count; $totalCount = $notification->recipients_count; $readPercentage = $totalCount > 0 ? round(($readCount / $totalCount) * 100) : 0; @endphp
مقروء: {{ $readCount }} {{ $readPercentage }}%
غير مقروء: {{ $totalCount - $readCount }}
@else غير مرسل بعد @endif
{{-- منشئ الإشعار --}}

منشئ الإشعار

{{ substr($notification->creator->name, 0, 1) }}
{{ $notification->creator->name }}
{{-- تاريخ الإنشاء والإرسال --}}

التواريخ

{{ $notification->created_at->format('Y/m/d H:i') }}
@if($notification->sent_at)
أُرسل: {{ $notification->sent_at->format('Y/m/d H:i') }}
@endif
{{-- Actions --}}
عرض @if($notification->status === 'draft') تعديل @endif
@empty

لا توجد إشعارات

ابدأ بإنشاء إشعار جديد للأعضاء

إشعار جديد
@endforelse
@if($notifications->hasPages())
{{ $notifications->links() }}
@endif
@endsection