@extends('layouts.app') @section('content')
{{-- Title Section: The main page title is "Bulk SMS Campaign Dashboard" --}}
{{-- Using the original icon: bx bx-message-square-dots --}}
Bulk SMS Campaign Dashboard
{{-- Breadcrumb Path: Dashboard -> Bulk SMS --}}
Upload Format
CSV
Excel/CSV Supported
Valid Numbers
@if(!empty($cleanData)) @if(is_object($cleanData) && method_exists($cleanData, 'total')) {{ number_format($cleanData->total()) }} @else {{ number_format(count($cleanData)) }} @endif @else 0 @endif
Ready to Send
Invalid Numbers
@if(!empty($problematicData)) @if(is_object($problematicData) && method_exists($problematicData, 'total')) {{ number_format($problematicData->total()) }} @else {{ number_format(count($problematicData)) }} @endif @else 0 @endif
Needs Correction
Success Rate
@php $cleanTotal = 0; $problematicTotal = 0; if(!empty($cleanData)) { $cleanTotal = is_object($cleanData) && method_exists($cleanData, 'total') ? $cleanData->total() : count($cleanData); } if(!empty($problematicData)) { $problematicTotal = is_object($problematicData) && method_exists($problematicData, 'total') ? $problematicData->total() : count($problematicData); } $totalRecords = $cleanTotal + $problematicTotal; $successRate = $totalRecords > 0 ? ($cleanTotal / $totalRecords) * 100 : 0; @endphp {{ number_format($successRate, 1) }}%
Data Quality
Step 1: Upload File or Select Campaign
History @if(!empty($headers))
@csrf
@endif
{{-- Status Messages --}} @if(session('success')) @endif @if(session('error')) @endif @if($errors->any()) @endif {{-- Failed Sends Summary --}} @if(session('failedSendsSummary') && count(session('failedSendsSummary')) > 0)
Warning: Some SMS could not be queued
    @foreach(session('failedSendsSummary') as $failed)
  • Phone: {{ $failed['phone'] ?? 'N/A' }}
    Reason: {{ $failed['reason'] ?? 'Unknown' }}
  • @endforeach
@csrf
@endif {{-- STEP 1: Upload File or Select Recent Campaign --}}
@csrf
Upload Data File

Click to browse or drag & drop your Excel/CSV file

Supported formats: .xlsx, .xls, .csv (Max 5MB)
@if(!empty($recentHistory) && count($recentHistory) > 0)

Already have a campaign file? Load it from your recent uploads

@endif
{{-- STEP 2: Review Data (Clean & Problematic) --}}
{{-- Valid Recipients Table --}} @if(!empty($cleanData) && count($cleanData) > 0)
Valid Recipients ({{ is_object($cleanData) && method_exists($cleanData, 'total') ? $cleanData->total() : count($cleanData) }})
@foreach($headers as $h) @endforeach @if(is_object($cleanData) && method_exists($cleanData, 'items')) @foreach($cleanData->items() as $row) @foreach($row as $cell) @endforeach @endforeach @else @foreach($cleanData as $row) @foreach($row as $cell) @endforeach @endforeach @endif
{{ strtoupper($h) }}
{{ $cell }}
{{ $cell }}
@if(is_object($cleanData) && method_exists($cleanData, 'links'))
{{ $cleanData->appends(['problematic_page' => request('problematic_page')])->links('pagination::bootstrap-5') }}
@endif
@endif {{-- Problematic Data Table --}} @if(!empty($problematicData) && count($problematicData) > 0)
Problematic Data ({{ is_object($problematicData) && method_exists($problematicData, 'total') ? $problematicData->total() : count($problematicData) }})
@csrf
@foreach($headers as $h) @endforeach @if(is_object($problematicData) && method_exists($problematicData, 'items')) @foreach($problematicData->items() as $row) @foreach($row['data'] as $cell) @endforeach @endforeach @else @foreach($problematicData as $row) @foreach($row['data'] as $cell) @endforeach @endforeach @endif
{{ strtoupper($h) }}ISSUE
{{ $cell }}{{ $row['reason'] }}
{{ $cell }}{{ $row['reason'] }}
@if(is_object($problematicData) && method_exists($problematicData, 'links'))
{{ $problematicData->appends(['clean_page' => request('clean_page')])->links('pagination::bootstrap-5') }}
@endif
@endif
{{-- STEP 3: Select Phone Number Column --}} {{-- STEP 4: Compose SMS Message --}} {{-- STEP 5: Review & Send --}}
{{-- JavaScript --}} @endsection