@php $devices = $devices ?? collect(); $templates = $templates ?? collect(); $groups = $groups ?? collect(); $queues = $queues ?? collect(); @endphp
{{ __('Scheduled / New') }}
{{ __('Schedule a') }} {{ __('message') }}
{{ __('Draft / unsaved') }}
@php // Shape templates for the JS picker. Only approved+active templates are // surfaced to the operator — same rule the /templates page uses. $tplJson = $templates ->map( fn($t) => [ 'id' => $t->id, 'name' => $t->template_name, 'body' => $t->template_body ?: '', 'cat' => $t->category ?: 'Marketing', ], ) ->values() ->all(); @endphp
1 {{ __('Basics') }}
2 {{ __('Recipients') }}
3 {{ __('Message') }}
4 {{ __('When') }}
5 {{ __('Review') }}
01 {{ __('Schedule basics') }} {{ __('required') }}
{{ __("Internal label only — recipients don't see this.") }}
@if ($devices->count() === 0)
{{ __('No connected devices.') }} {{ __('Connect one →') }}
@elseif ($devices->count() === 1) @php $only = $devices->first(); @endphp
{{ trim((string) $only->device_name) ?: 'Device #' . $only->id }} {{ $only->phone_number }}
@else {{-- Multi-device picker — each ticked device gets its own ScheduledMessage row (server fans out via device_ids[]). Contact-numbers split round-robin across rows so each customer gets one message total, not one per device. --}}
@foreach ($devices as $d) @endforeach
{{ __('Each ticked device runs its own schedule with a fair share of the audience.') }}
@endif
{{ __('Step') }} 1 of 5