@extends('layouts.dashboard') @section('title', 'SMS Summary Report') @section('content')

SMS Summary Report

@if($canExport) Export to Excel @endif
@if(isset($clients) && $clients->count() > 0)
@endif

{{ number_format($summary['total']) }}

Total SMS

{{ number_format($summary['sent']) }}

Sent

{{ number_format($summary['delivered']) }}

Delivered

{{ number_format($summary['failed']) }}

Failed

{{ number_format($summary['pending']) }}

Pending
SMS Trend
Status Distribution
SMS Details
@forelse($report as $log) @empty @endforelse
ID User Phone Number Status Call Type Message Sent At
{{ $log->id }} {{ $log->user->name ?? 'N/A' }} {{ $log->phone_number }} @if(!empty($log->contact_name))
{{ $log->contact_name }}
@endif
@switch(strtoupper($log->status)) @case('SENT') Sent @break @case('DELIVERED') Delivered @break @case('FAILED') Failed @break @case('PENDING') Pending @break @default {{ $log->status }} @endswitch @if($log->callLog) @switch(strtoupper($log->callLog->call_type)) @case('INCOMING') Incoming @break @case('OUTGOING') Outgoing @break @case('MISSED') Missed @break @case('REJECTED') Rejected @break @default {{ $log->callLog->call_type }} @endswitch @else N/A @endif {{ $log->message }} {{ \Carbon\Carbon::parse($log->sent_at)->format('Y-m-d H:i:s') }}
No SMS found for the selected criteria.
{{ $report->appends(request()->query())->links() }}
@push('scripts') @endpush @endsection