@extends('layouts.superadmin') @section('title','NotifyHub — السجل') @section('content') @php $from = $from ?? now()->subDays(14)->toDateString(); $to = $to ?? now()->toDateString(); $badge = [ 'sent' => ['label'=>'تم الإرسال','cls'=>'bg-emerald-500/15 border-emerald-400/25 text-emerald-200'], 'failed' => ['label'=>'فشل','cls'=>'bg-rose-500/15 border-rose-400/25 text-rose-200'], 'scheduled' => ['label'=>'مجدول','cls'=>'bg-amber-500/15 border-amber-400/25 text-amber-200'], 'draft' => ['label'=>'مسودة','cls'=>'bg-slate-500/15 border-white/10 text-slate-200'], 'cancelled' => ['label'=>'ملغي','cls'=>'bg-slate-500/10 border-white/10 text-slate-300'], ]; $typeLbl = [ 'decision' => 'قرار', 'live' => 'لايف', 'weekly_test' => 'اختبار', 'daily_reading' => 'اقرأني', 'reminder' => 'تذكير', 'custom' => 'مخصص', ]; @endphp
{{-- HERO --}}
NotifyHub — Logs

سجل الإشعارات Logs

يعرض محاولات الإرسال (Push/Internal) مع الحالة والخطأ إن وُجد.

{{-- Flash --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Filters --}}
{{-- Table --}}
السجل
مجموع: {{ method_exists($rows,'total') ? number_format($rows->total()) : number_format(count($rows)) }}
@forelse($rows as $r) @php $b = $badge[$r->status] ?? ['label'=>$r->status,'cls'=>'bg-white/5 border-white/10 text-white/80']; @endphp @empty @endforelse
# الوقت القناة الحالة الإشعار النوع خطأ
{{ $r->id }} {{ \Illuminate\Support\Carbon::parse($r->created_at)->format('Y-m-d H:i') }} {{ strtoupper($r->channel) }} {{ $b['label'] }}
{{ $r->notif_title ?? '—' }}
HubID: {{ $r->notification_id }}
{{ $typeLbl[$r->notif_type ?? 'custom'] ?? ($r->notif_type ?? '—') }} {{ $r->notif_status ?? '—' }}
{{ $r->error ?: '—' }}
لا يوجد سجلات ضمن هذه الفترة.
@if(method_exists($rows,'links'))
{{ $rows->links() }}
@endif
@endsection