@extends('layouts.admin') @section('title', 'Admin Mail Centre & Broadcast Queue') @section('page-title', 'Mail Centre & Communication Operations') @section('content')
Total Campaigns {{ $totalCampaigns }}
Delivered Emails {{ number_format($totalDelivered) }}
Failed Deliveries {{ number_format($totalFailed) }}
Saved Templates {{ $templatesCount }}

Broadcast Dispatch Registry

Asynchronous queue tracking and campaign delivery audits.
Compose Broadcast
@php $statuses = [ 'all' => 'All Broadcasts', 'completed' => 'Completed', 'processing' => 'Processing', 'queued' => 'Queued', 'failed' => 'Failed', ]; @endphp @foreach($statuses as $stKey => $stLabel) {{ $stLabel }} @endforeach
@forelse($campaigns as $camp) @empty @endforelse
Campaign Subject Target Audience Delivery Progress Dispatched By Status Queued At Action
{{ $camp->subject }} @if($camp->attachment_path) @endif {{ $camp->target_type_label }}
{{ $camp->sent_count }} sent @if($camp->failed_count > 0) • {{ $camp->failed_count }} failed @endif / {{ $camp->recipient_count }} total
{{ $camp->sender ? $camp->sender->name : 'System' }} @php $campStatusBadge = match($camp->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($camp->status)], }; @endphp {{ $campStatusBadge['label'] }} {{ $camp->queued_at ? $camp->queued_at->format('d M Y, h:i A') : $camp->created_at->format('d M Y') }} Details
No broadcast campaigns found in the registry.
@if($campaigns->hasPages())
{{ $campaigns->links() }}
@endif

Reusable Email Templates

Pre-approved templates for notifications, statutory advisories, and career drives.
@forelse($templates as $tpl)
{{ $tpl->category }}
@csrf @method('DELETE')

{{ $tpl->title }}

Subject: {{ $tpl->subject }}

{{ $tpl->body }}
Use in Broadcast
@empty
No saved templates yet. Click "New Template" above to save your first reusable layout.
@endforelse
@endsection