@extends('backend.template.layouts.template-base') @section('title', 'Notification Log Detail') @section('content')

Log Detail #{{ $notifRequest->id }}

{{ ucfirst($notifRequest->status) }}
{{-- Summary card --}}
Request Summary
Event {{ \App\Models\NotificationTemplate::triggerEventLabel($notifRequest->trigger_event) }} {{ $notifRequest->trigger_event }}
Channels @foreach($notifRequest->channels ?? [] as $ch) {{ $ch }} @endforeach
User Recipients {{ count($notifRequest->user_ids ?? []) }}
Sent At {{ $notifRequest->created_at->format('d M Y, h:i A') }}
{{-- Per-channel stats --}} @if($logsByChannel->isEmpty())
No delivery log entries found for this request. Jobs may still be queued.
@else
@foreach($logsByChannel as $channel => $stats)
{{ $channel }}
{{ $stats['sent'] }}
Sent
{{ $stats['failed'] }}
Failed
{{ $stats['skip'] }}
Skipped
@endforeach
{{-- Detailed rows per channel --}} @foreach($logsByChannel as $channel => $stats)
{{ $channel }} Logs
{{ $stats['total'] }} entries
@foreach($stats['rows'] as $log) @endforeach
User ID Mobile Status Sent At Failure Reason
{{ $log->user_id ?? '—' }} {{ $log->mobile ?? '—' }} @php $statusClass = match($log->status) { 'sent' => 'text-success', 'failed' => 'text-danger', default => 'text-warning', }; @endphp {{ ucfirst($log->status) }} {{ $log->sent_at?->format('h:i:s A') ?? '—' }} {{ $log->failure_reason ?? '—' }}
@endforeach @endif
@endsection