{{-- Status Messages --}}
@if(session('success'))
Success!
{{ session('success') }}
@if(str_contains(session('success'), 'queued'))
Messages are being processed in the background and will be sent shortly.
@endif
@endif
@if(session('error'))
@endif
@if($errors->any())
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@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
@endif
{{-- Step 1: Upload CSV File --}}
@if(empty($headers))
@else
{{-- Step 2: Compose & Send SMS --}}
@if(!empty($cleanData) && count($cleanData) > 0)
Ready to Send! You have {{ count($cleanData) }} valid phone numbers.
Compose Message
@endif
{{-- Valid Recipients Table --}}
@if(!empty($cleanData) && count($cleanData) > 0)
Valid Recipients ({{ count($cleanData) }})
@foreach($headers as $h)
{{ strtoupper($h) }}
@endforeach
@if(is_object($cleanData) && method_exists($cleanData, 'items'))
@foreach($cleanData->items() as $row)
@foreach($row as $cell)
{{ $cell }}
@endforeach
@endforeach
@else
@foreach($cleanData as $row)
@foreach($row as $cell)
{{ $cell }}
@endforeach
@endforeach
@endif
@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 ({{ count($problematicData) }})
Data Quality Issues: Invalid phone numbers or missing data detected.
@csrf
Download Problematic Data
@foreach($headers as $h)
{{ strtoupper($h) }}
@endforeach
ISSUE
@if(is_object($problematicData) && method_exists($problematicData, 'items'))
@foreach($problematicData->items() as $row)
@foreach($row['data'] as $cell)
{{ $cell }}
@endforeach
{{ $row['reason'] }}
@endforeach
@else
@foreach($problematicData as $row)
@foreach($row['data'] as $cell)
{{ $cell }}
@endforeach
{{ $row['reason'] }}
@endforeach
@endif
@if(is_object($problematicData) && method_exists($problematicData, 'links'))
{{ $problematicData->appends(['clean_page' => request('clean_page')])->links('pagination::bootstrap-5') }}
@endif
@endif
@endif