@extends('layouts.app') @section('content')
{{-- Title Section: Bulk SMS Campaign Dashboard --}}
Bulk SMS Campaign Dashboard
{{-- Breadcrumb Path: Dashboard -> Bulk SMS --}}
Upload Format
CSV
Excel/CSV Supported
Valid Numbers
{{ !empty($cleanData) ? number_format(count($cleanData)) : '0' }}
Ready to Send
Invalid Numbers
{{ !empty($problematicData) ? number_format(count($problematicData)) : '0' }}
Needs Correction
Success Rate
{{ !empty($cleanData) && !empty($problematicData) ? number_format((count($cleanData) / (count($cleanData) + count($problematicData))) * 100, 1) : '0' }}%
Data Quality
1
2
3
{{ empty($headers) ? 'Upload CSV File' : 'SMS Campaign Composer' }}
{{-- Status Messages --}} @if(session('success')) @endif @if(session('error')) @endif @if($errors->any()) @endif {{-- Display Failed Sends Summary --}} @if(session('failedSendsSummary') && count(session('failedSendsSummary')) > 0)
Warning: Some SMS sending jobs could not be queued
    @foreach(session('failedSendsSummary') as $failed)
  • Phone Number: {{ $failed['phone'] ?? 'N/A' }}
    Reason: {{ $failed['reason'] ?? 'Unknown' }}
    @if(isset($failed['message'])) Message: "{{ Str::limit($failed['message'], 50) }}" @endif
  • @endforeach
@csrf
@endif {{-- Step 1: Upload CSV File --}} @if(empty($headers))
@csrf
Upload Data File

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

Supported formats: .xlsx, .xls, .csv (Max 5MB)
@else {{-- Clear Session Button --}}
@csrf
{{-- Step 2: Compose & Send SMS --}} @if(!empty($cleanData) && count($cleanData) > 0)
Ready to Send! You have {{ count($cleanData) }} valid phone numbers ready for SMS sending.
@csrf
Optional - For your reference only
Optional - For your reference only
{{-- Initial text input and field select --}}
{{-- Real-time Message Preview --}}
Character count: 0/160 (Standard SMS)
@endif
{{-- Display Clean Data --}} @if(!empty($cleanData) && count($cleanData) > 0)
Valid Recipients ({{ 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
{{ $h }}
{{ $cell }}
{{ $cell }}
@if(is_object($cleanData) && method_exists($cleanData, 'links')) @endif
@endif {{-- Display Problematic Data --}} @if(!empty($problematicData) && count($problematicData) > 0)
Problematic Data ({{ count($problematicData) }})
Data Quality Issues: The following rows contain invalid phone numbers or missing data. You can download this data to correct it and re-upload.
@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
{{ $h }}Issue
{{ $cell }} {{ $row['reason'] }}
{{ $cell }} {{ $row['reason'] }}
@if(is_object($problematicData) && method_exists($problematicData, 'links')) @endif
@endif @endif
@if(!empty($recentHistory) && count($recentHistory) > 0)
Recent Campaigns
View All
@foreach($recentHistory->take(5) as $history) @endforeach
Campaign Message Recipients Date Actions
{{ $history->title ?? 'Untitled Campaign' }} {{ Str::limit($history->message, 50) }} {{ $history->number_of_recipients }} {{ $history->sent_at ? $history->sent_at->format('M d, Y') : 'N/A' }}
@endif
{{-- JavaScript for dynamic SMS builder (Logic Haukuguswa) --}} @endsection