Kelola
@if(session('success'))
{{ session('success') }}
@endif
@if(session('error'))
{{ session('error') }}
@endif
@if(session('warning'))
{{ session('warning') }}
@endif
@if(session('info'))
{{ session('info') }}
@endif
@yield('content')
@php
$recentCount = \App\Models\NotifikasiWa::where('is_read', false)->count();
$sentCount = \App\Models\NotifikasiWa::where('status', 'Terkirim')->orWhere('status', 'sent')->count();
$failedCount = \App\Models\NotifikasiWa::where('status', 'Gagal')->orWhere('status', 'failed')->count();
@endphp
@php
$panelNotifications = \App\Models\NotifikasiWa::with('penduduk')
->orderBy('created_at', 'desc')
->limit(10)
->get();
@endphp
@forelse($panelNotifications as $notification)
@if($notification->status == 'Terkirim' || $notification->status == 'sent')
@elseif($notification->status == 'Gagal' || $notification->status == 'failed')
@else
@endif
{{ ucfirst(str_replace('_', ' ', $notification->message_type ?: $notification->jenis ?: 'Notifikasi WhatsApp')) }}
{{ Str::limit($notification->message ?: $notification->pesan, 100) }}
{{ $notification->created_at->diffForHumans() }}
@if(!$notification->is_read)
@endif
@empty
Belum ada notifikasi WhatsApp
@endforelse