@extends('layouts.app') @section('title', 'Notifikasi WhatsApp') @section('breadcrumb') @endsection @section('content')

Pusat Notifikasi WhatsApp

Kelola dan kirim notifikasi WhatsApp ke seluruh warga desa

Total Notifikasi
0
Belum Dibaca
0
Menunggu Kirim
0
Berhasil Terkirim
0
Gagal Terkirim
0
Hari Ini
0

📱 Notifikasi WhatsApp Terbaru

Kelola dan pantau status pengiriman pesan

@if($recentNotifications->count() > 0)
@foreach($recentNotifications as $notification) @endforeach
Waktu Penerima Detail Pesan Jenis Status Aksi
{{ $notification->created_at->format('d/m/Y') }} {{ $notification->created_at->format('H:i') }} {{ $notification->created_at->diffForHumans() }}
{{ $notification->phone_number ?: $notification->no_wa_legacy }}
@if($notification->penduduk) {{ $notification->penduduk->nama }}
@if($notification->penduduk->dusun) {{ $notification->penduduk->dusun }} @endif @else Nomor External @endif
{{ Str::limit($notification->message ?: $notification->pesan_legacy, 100) }}
@if(!$notification->is_read) Baru @endif {{ strlen($notification->message ?: $notification->pesan_legacy) }} karakter @if($notification->sent_at) {{ $notification->sent_at->format('H:i') }} @endif
@php $type = $notification->message_type ?: $notification->jenis_legacy; $typeConfig = [ 'surat_selesai' => ['color' => 'success', 'icon' => 'fas fa-file-alt', 'label' => 'Surat Selesai'], 'bantuan_diterima' => ['color' => 'primary', 'icon' => 'fas fa-hand-holding-heart', 'label' => 'Bantuan Diterima'], 'pengaduan_ditanggapi' => ['color' => 'warning', 'icon' => 'fas fa-reply', 'label' => 'Pengaduan Ditanggapi'], 'broadcast_berita' => ['color' => 'info', 'icon' => 'fas fa-bullhorn', 'label' => 'Broadcast Berita'], 'manual' => ['color' => 'secondary', 'icon' => 'fas fa-edit', 'label' => 'Manual'] ]; $config = $typeConfig[$type] ?? ['color' => 'dark', 'icon' => 'fas fa-envelope', 'label' => 'General']; @endphp {{ $config['label'] }} @switch($notification->status) @case('Terkirim') @case('sent')
Terkirim
@if($notification->sent_at) {{ $notification->sent_at->format('H:i') }} @endif
@break @case('Pending') @case('pending')
Menunggu
Dalam antrian
@break @case('Gagal') @case('failed')
Gagal
Coba lagi
@break @default {{ ucfirst($notification->status) }} @endswitch
@if(!$notification->is_read) @endif
@if(in_array($notification->status, ['Gagal', 'failed'])) @endif
@else

Belum Ada Notifikasi WhatsApp

Notifikasi WhatsApp akan muncul di sini setelah ada aktivitas dari warga.
Anda juga dapat mengirim notifikasi manual menggunakan fitur broadcast.

@endif
@endsection @push('styles') @endpush @push('scripts') @endpush