{{-- resources/views/notifications/log.blade.php --}} @extends('layouts.app') @section('title', 'Notification Log') @section('page_title', 'Notification Log') @section('page_subtitle', 'All sent and queued notifications') @section('content') {{-- Filters --}}
@if(request()->hasAny(['search','channel','status','event'])) Clear @endif
{{-- Log Table --}}
Notification Log {{ $logs->total() }} entries
@if($logs->isEmpty())

No notifications found

@else
@foreach($logs as $log) @php $channelColors = [ 'email' => ['bg'=>'#dbeafe','color'=>'#1e40af','icon'=>'bi-envelope'], 'sms' => ['bg'=>'#d1fae5','color'=>'#065f46','icon'=>'bi-chat-dots'], 'whatsapp' => ['bg'=>'#dcfce7','color'=>'#166534','icon'=>'bi-whatsapp'], ]; $cc = $channelColors[$log->channel] ?? $channelColors['email']; $statusConfig = [ 'sent' => ['bg'=>'#d1fae5','color'=>'#065f46'], 'failed' => ['bg'=>'#fee2e2','color'=>'#991b1b'], 'pending' => ['bg'=>'#fef3c7','color'=>'#92400e'], 'queued' => ['bg'=>'#dbeafe','color'=>'#1e40af'], ]; $sc = $statusConfig[$log->status] ?? ['bg'=>'#f1f5f9','color'=>'#475569']; @endphp @endforeach
Channel Guest / Recipient Event Subject / Preview Status Sent
{{ ucfirst($log->channel) }} @if($log->guest)
{{ $log->guest->first_name }} {{ $log->guest->last_name }}
@endif
{{ $log->recipient }}
{{ ucfirst(str_replace('_', ' ', $log->event)) }} @if($log->subject)
{{ $log->subject }}
@endif
{{ Str::limit(strip_tags($log->body), 60) }}
{{ ucfirst($log->status) }} @if($log->status === 'failed' && $log->error)
{{ $log->error }}
@endif @if($log->attempts > 1)
{{ $log->attempts }} attempts
@endif
{{ $log->created_at->format('d M Y') }}
{{ $log->created_at->format('H:i') }}
{{-- Preview --}} {{-- Retry --}} @if($log->status === 'failed')
@csrf
@endif
@if($logs->hasPages())
{{ $logs->links() }}
@endif @endif
{{-- Preview Modal --}} @endsection @push('scripts') @endpush