@extends('layouts.admin')
@section('title', "Campaign #{$campaign->id}: {$campaign->subject}")
@section('page-title', "Broadcast Campaign #{$campaign->id}")
@section('content')
Delivery Status
@php
$campStatusBadge = match($campaign->status) {
'completed' => ['bg' => 'rgba(16, 185, 129, 0.15)', 'color' => 'var(--success)', 'label' => 'Completed'],
'processing' => ['bg' => 'rgba(245, 158, 11, 0.15)', 'color' => '#d97706', 'label' => 'Processing'],
'queued' => ['bg' => 'rgba(14, 165, 233, 0.15)', 'color' => '#0284c7', 'label' => 'Queued'],
'failed' => ['bg' => 'rgba(239, 68, 68, 0.15)', 'color' => '#ef4444', 'label' => 'Failed'],
default => ['bg' => 'var(--bg-surface)', 'color' => 'var(--text-light)', 'label' => ucfirst($campaign->status)],
};
@endphp
{{ $campStatusBadge['label'] }}
Total Audience
{{ $campaign->recipient_count }}
Successfully Delivered
{{ $campaign->sent_count }}
Failed Transmissions
{{ $campaign->failed_count }}
Target Segment:
{{ $campaign->target_type_label }}
Dispatched By:
{{ $campaign->sender ? $campaign->sender->name . ' (' . $campaign->sender->email . ')' : 'System' }}
Queued / Dispatched:
{{ $campaign->queued_at ? $campaign->queued_at->format('d M Y, h:i A') : '—' }}
Finished Delivery:
{{ $campaign->completed_at ? $campaign->completed_at->format('d M Y, h:i A') : ($campaign->status === 'completed' ? 'Done' : 'In Progress') }}
Transmitted Message Body
{{ $campaign->body }}
@if($campaign->attachment_path)
@endif
Recipient Delivery Transmission Log
Row-by-row delivery outcome for all queued recipients.
@php
$recStatuses = [
'all' => 'All Recipients',
'sent' => 'Delivered (Sent)',
'pending' => 'Pending',
'failed' => 'Failed',
];
@endphp
@foreach($recStatuses as $rsKey => $rsLabel)
{{ $rsLabel }}
@endforeach
| Recipient |
Email Address |
Delivery Status |
Sent At |
Diagnostics / Error |
@forelse($recipients as $recipient)
|
@if($recipient->user)
{{ $recipient->name ?: $recipient->user->name }}
@else
{{ $recipient->name ?: 'Direct Recipient' }}
@endif
|
{{ $recipient->email }}
|
@if($recipient->status === 'sent')
Sent
@elseif($recipient->status === 'failed')
Failed
@else
Pending
@endif
|
{{ $recipient->sent_at ? $recipient->sent_at->format('d M Y, h:i:s A') : '—' }}
|
{{ $recipient->error_message ?: 'Delivered without transmission exceptions' }}
|
@empty
|
No recipient records found for this filter.
|
@endforelse
@if($recipients->hasPages())
{{ $recipients->links() }}
@endif
@endsection