@extends('layouts.superadmin') @section('title','NotifyHub — قائمة الإشعارات') @section('content') @php $status = $status ?? ''; $type = $type ?? ''; $q = $q ?? ''; $badge = [ 'sent' => 'border-emerald-400/25 bg-emerald-500/15 text-emerald-200', 'scheduled' => 'border-sky-400/25 bg-sky-500/15 text-sky-200', 'draft' => 'border-slate-400/25 bg-white/10 text-white/80', 'cancelled' => 'border-rose-400/25 bg-rose-500/15 text-rose-200', ]; $typeMeta = [ 'decision' => ['t'=>'قرار', 'i'=>'fa-gavel', 'c'=>'emerald'], 'live' => ['t'=>'لايف', 'i'=>'fa-tower-broadcast', 'c'=>'fuchsia'], 'weekly_test' => ['t'=>'اختبار', 'i'=>'fa-clipboard-check', 'c'=>'amber'], 'daily_reading' => ['t'=>'قراءة', 'i'=>'fa-book-open-reader', 'c'=>'cyan'], 'custom' => ['t'=>'مخصص', 'i'=>'fa-wand-magic-sparkles','c'=>'violet'], ]; $chip = [ 'emerald' => 'bg-emerald-500/12 border-emerald-400/25 text-emerald-200', 'fuchsia' => 'bg-fuchsia-500/12 border-fuchsia-400/25 text-fuchsia-200', 'amber' => 'bg-amber-500/12 border-amber-400/25 text-amber-200', 'cyan' => 'bg-cyan-500/12 border-cyan-400/25 text-cyan-200', 'violet' => 'bg-violet-500/12 border-violet-400/25 text-violet-200', 'slate' => 'bg-white/8 border-white/10 text-white/80', ]; @endphp
{{-- HERO / HEADER (Epic) --}}

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

Live Center

إدارة، تصفية، ومتابعة جميع الإشعارات (يدوي + تلقائي)

إشعار جديد
{{-- QUICK STATS --}}
الإجمالي
{{ $rows->total() ?? count($rows) }}
مرسل
{{ method_exists($rows,'where') ? $rows->where('status','sent')->count() : '' }}
مجدول
{{ method_exists($rows,'where') ? $rows->where('status','scheduled')->count() : '' }}
ملغي
{{ method_exists($rows,'where') ? $rows->where('status','cancelled')->count() : '' }}
{{-- FILTERS (Epic + Mobile Friendly) --}}
التصفية والبحث
ابحث بالعنوان/النص وحدد الحالة والنوع
{{-- Active filter chips --}}
@if($q) بحث: {{ $q }} @endif @if($status) حالة: {{ $status }} @endif @if($type) @php $tm = $typeMeta[$type] ?? ['t'=>$type,'i'=>'fa-shapes','c'=>'slate']; $tcls = $chip[$tm['c']] ?? $chip['slate']; @endphp نوع: {{ $tm['t'] }} @endif
{{-- MOBILE CARDS --}}
@forelse($rows as $n) @php $st = $n->status; $cls = $badge[$st] ?? 'border-white/10 bg-white/5 text-white/80'; $tm = $typeMeta[$n->type] ?? ['t'=>$n->type,'i'=>'fa-shapes','c'=>'slate']; $tcls = $chip[$tm['c']] ?? $chip['slate']; @endphp
#{{ $n->id }} — {{ $n->title }}
{{ \Illuminate\Support\Str::limit($n->body, 140) }}
{{ $st }}
{{ $tm['t'] }} {{ $n->audience }} {{ \Carbon\Carbon::parse($n->created_at)->format('Y-m-d H:i') }}
{{ $n->type }}
تعديل
@empty
لا يوجد إشعارات
جرّب تغيير الفلاتر أو أضف إشعار جديد
@endforelse
{{-- DESKTOP TABLE --}} {{-- Pagination --}}
{{ $rows->links() }}
{{-- clamp helper (Tailwind line-clamp plugin) fallback (safe) --}} @endsection