@extends('client.layouts.dashboard') @section('title', 'WhatsApp Logs') @section('styles') @endsection @section('content')
WhatsApp Activity Report

View and analyze all WhatsApp auto-messages sent by your organization's users

Export WhatsApp Data
@php $totalWa = $stats['total'] ?: 1; $waDelivery = round(($stats['sent'] / $totalWa) * 100, 1); $waFailRate = round(($stats['failed'] / $totalWa) * 100, 1); @endphp
WhatsApp Delivery Rate {{ $waDelivery }}%
Sent {{ $stats['sent'] }} Pending {{ $stats['pending'] }} Failed {{ $stats['failed'] }}
{{ $waDelivery }}%
Success Rate
{{ $waFailRate }}%
Failure Rate
{{ number_format($stats['total']) }}
Total Messages
{{-- Delivery Status Breakdown Cards --}}
WhatsApp Delivery Breakdown
Click a status to filter
WhatsApp Log Records
Showing {{ $whatsAppLogs->firstItem() ?? 0 }}-{{ $whatsAppLogs->lastItem() ?? 0 }} of {{ $whatsAppLogs->total() }}
@forelse($whatsAppLogs as $log) @empty @endforelse
User Phone Number Message Type Status Time
{{ strtoupper(substr($log->user->name ?? 'U', 0, 1)) }}
{{ $log->user->name ?? 'Unknown' }}
{{ $log->phone_number }} @if($log->contact_name)
{{ $log->contact_name }}@endif
@if($log->sms_type === 'auto_reply')Auto Reply @elseif($log->sms_type === 'promotion')Promotion @else{{ ucfirst(str_replace('_',' ',$log->sms_type ?? 'unknown')) }}@endif @if($log->status === 'sent')Sent @elseif($log->status === 'pending')Pending @elseFailed@endif
{{ $log->created_at->format('M d, Y') }}
{{ $log->created_at->format('h:i A') }}

No WhatsApp logs found

@if($whatsAppLogs->hasPages()) @endif
@endsection