@php $stats = $stats ?? [ 'total' => 0, 'queued' => 0, 'running' => 0, 'sent' => 0, 'failed' => 0, 'sent_total' => 0, 'delivered_total' => 0, 'read_total' => 0, 'failed_total' => 0, 'processing' => 0, 'messageTypes' => [], 'statusCounts' => [], 'deliveryHealth' => ['avg_delivery_rate' => 0, 'failing_campaigns' => 0, 'status' => 'healthy'], 'queueHealth' => ['template_approval_rate' => 100, 'devices_ready' => 'N/A', 'retry_backlog' => 0], ]; $campaigns = $campaigns ?? collect(); $currentStatus = $currentStatus ?? 'all'; $currentType = $currentType ?? 'all'; $currentRange = $currentRange ?? 'all'; $currentSearch = $currentSearch ?? ''; $statusCounts = $stats['statusCounts'] ?? []; @endphp @if (session('status') || $errors->any()) @push('scripts') @endpush @endif
{{ __('Workspace - Bloomly') }}

{{ __('WhatsApp') }} {{ __('campaigns') }}

{{ __('Broadcast queues, templates, flows, schedule status, and delivery outcomes in one place.') }}

{{ __('Sent') }}
{{ number_format($stats['sent_total']) }}
{{ number_format($stats['total']) }} campaigns
{{ __('Delivered') }}
{{ number_format($stats['delivered_total']) }}
@if ($stats['sent_total'] > 0) {{ number_format(($stats['delivered_total'] / max($stats['sent_total'], 1)) * 100, 1) }} @else 0 @endif % delivery
{{ __('Read') }}
{{ number_format($stats['read_total']) }}
@if ($stats['delivered_total'] > 0) {{ number_format(($stats['read_total'] / max($stats['delivered_total'], 1)) * 100, 1) }} @else 0 @endif % read rate
{{ __('Failed') }}
{{ number_format($stats['failed_total']) }}
{{ number_format($stats['failed']) }} failed campaigns
{{ __('Processing') }}
{{ number_format($stats['processing']) }}
{{ number_format($stats['queued']) }} queued
{{-- Top filter strip — date range pills + live search --}}
@foreach ([['all', 'All time'], ['7d', 'Last 7 days'], ['30d', 'Last 30 days'], ['90d', 'Last 90 days']] as [$rk, $rl]) @php $active = $currentRange === $rk; @endphp @endforeach
@include('user.wa-campaigns._cards', ['campaigns' => $campaigns])
@include('user.partials.pagination', [ 'paginator' => $campaigns, 'dataAttr' => 'data-wac-page', 'label' => 'campaigns', ])
{{ __('Help - 01') }}
{{ __('What is a WhatsApp campaign?') }}

{{ __('A broadcast queue that sends a custom message, approved template, or flow to selected contacts through your connected device.') }}

{{ __('Help - 02') }}
{{ __('How do I improve delivery?') }}

{{ __('Keep lists clean, use approved templates for outbound sends, and schedule larger broadcasts instead of pushing every contact at once.') }}

{{ __('Help - 03') }}
{{ __('Which campaign should I launch first?') }}

{{ __('Begin with a template update or re-engagement broadcast, then compare delivered, read, and failed counts before scaling.') }}

{{-- --}}