@extends('layouts.app') @section('content')
{{-- Title Section: The main page title is "SMS Campaign History" --}}
{{-- Using the original icon: bx bx-history --}}
SMS Campaign History
{{-- Breadcrumb Path: Dashboard -> Bulk SMS -> History --}}
@if(session('success')) @endif @if(session('error')) @endif
All SMS Campaign Records
New Campaign
@forelse($histories ?? [] as $history) @empty @endforelse
ID Heading Title Message Sent By Recipients Successful Failed Status Response Time Sent At Actions
#{{ $history->id }} {{ $history->heading ?? 'N/A' }} {{ $history->title ?? 'N/A' }} {{ Str::limit($history->message ?? 'N/A', 50) }} {{ $history->sender->name ?? 'Unknown User' }} {{ $history->number_of_recipients ?? 0 }} {{ $history->successful_sends ?? 0 }} {{ $history->failed_sends ?? 0 }} @php $status = strtolower($history->status ?? 'pending'); $badgeClass = 'badge-pending'; if($status === 'completed' || $status === 'success') { $badgeClass = 'badge-success'; } elseif($status === 'failed' || $status === 'error') { $badgeClass = 'badge-failed'; } elseif($status === 'processing') { $badgeClass = 'badge-processing'; } @endphp {{ ucfirst($history->status ?? 'Pending') }} {{ $history->response_time ?? 'N/A' }} {{ $history->created_at ? $history->created_at->format('Y-m-d H:i') : 'N/A' }}

No SMS campaign history found

@if($histories && $histories->hasPages()) @endif
@endsection