@extends('layouts.app') @section('title', 'WhatsApp Gateway') @section('content')
@include('admin.partials.sidebar')
@include('admin.partials.topbar')

WhatsApp Gateway

Kelola notifikasi WhatsApp

{{ $connected ? 'Connected' : 'Disconnected' }}
Kirim Pesan
@csrf
+62

Contoh: 81234567890

Gunakan *text* untuk bold, _text_ untuk italic

Quick Actions

Test Notifikasi

Kirim test ke pelanggan tertentu

Riwayat Notifikasi
Lihat Semua

{{ number_format($stats['total'] ?? 0) }}

Total

{{ number_format($stats['sent'] ?? 0) }}

Terkirim

{{ number_format($stats['failed'] ?? 0) }}

Gagal

{{ number_format($stats['today'] ?? 0) }}

Hari Ini

@if(isset($recentLogs) && $recentLogs->count() > 0)
@foreach($recentLogs as $log) @endforeach
Waktu Penerima Tipe Status
{{ $log->created_at->format('d/m H:i') }}
{{ $log->customer->name ?? '-' }}
{{ $log->phone }}
@php $typeColors = [ 'invoice' => 'bg-blue-100 text-blue-800', 'reminder' => 'bg-yellow-100 text-yellow-800', 'suspension' => 'bg-red-100 text-red-800', 'voucher' => 'bg-purple-100 text-purple-800', ]; @endphp {{ ucfirst($log->type) }} @if($log->status == 'sent') Terkirim @else Gagal @endif
@else

Belum ada riwayat notifikasi

@endif
Template Pesan
Invoice Notification
Halo *{nama}*,

Tagihan internet Anda telah terbit:

📋 Invoice: {invoice}
📦 Paket: {paket}
💰 Total: Rp {amount}
📅 Jatuh Tempo: {due_date}

Terima kasih,
*{app_name}*
Payment Confirmation
Halo *{nama}*,

✅ Pembayaran diterima!

📋 Invoice: {invoice}
💰 Jumlah: Rp {amount}
📅 Tanggal: {paid_date}

Terima kasih,
*{app_name}*
Payment Reminder
⚠️ *Pengingat Pembayaran*

Halo *{nama}*,

Tagihan belum dibayar:

📋 Invoice: {invoice}
💰 Total: Rp {amount}
📅 Jatuh Tempo: {due_date}

*{app_name}*
Konfigurasi
API URL {{ config('services.whatsapp.api_url') ?: 'Not configured' }}
Sender Number {{ config('services.whatsapp.sender') ?: 'Not configured' }}
Status @if($connected) Connected @else Disconnected @endif

Konfigurasi WhatsApp Gateway dapat diubah di file .env

@push('scripts') @endpush @endsection