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

View and analyze all SMS auto-replies sent by your organization's users

Export SMS Data
{{ number_format($stats['sms_total']) }}
Total SMS Sent
{{ number_format($stats['sent']) }}
Delivered
{{ number_format($stats['pending']) }}
Pending
{{ number_format($stats['failed']) }}
Failed
@php $totalMsg = $stats['sms_total'] ?: 1; $deliveryRate = round(($stats['sent'] / $totalMsg) * 100, 1); $failRate = round(($stats['failed'] / $totalMsg) * 100, 1); @endphp
SMS Delivery Rate {{ $deliveryRate }}%
Sent {{ $stats['sent'] }} Pending {{ $stats['pending'] }} Failed {{ $stats['failed'] }}
{{ number_format($stats['sms_total'] - $stats['whatsapp_total']) }}
SMS Only
{{ $failRate }}%
Failure Rate
{{ number_format($stats['total']) }}
All Messages
{{-- Delivery Status Breakdown Cards --}}
SMS Delivery Breakdown
Click a status to filter
SMS Log Records
Showing {{ $smsLogs->firstItem() ?? 0 }}-{{ $smsLogs->lastItem() ?? 0 }} of {{ $smsLogs->total() }}
@forelse($smsLogs as $log) @empty @endforelse
User Phone Number Message Type Status Direction 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 @if($log->sms_type === 'incoming')Incoming @elseOutgoing@endif
{{ $log->created_at->format('M d, Y') }}
{{ $log->created_at->format('h:i A') }}

No SMS logs found

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