{{-- SMS-utskick, one SMS sendout (DESIGN.md Page patterns 4; #2957 slice 5a, card #3019). Same data as before the reskin (SMSSendoutController@show): the name, the message, "Antal SMS" (SMS rows of type 1) and "Antal SMS-delar" (their parts), plus how many of them have been handed to the operator (the list's "Skickade" number) as a progress bar. The old page had no charts and its replies table was switched off (the controller still passes $replies), so neither is shown. Counted in SQL instead of loading every SMS row, as the old view did. --}} @extends('layouts.nuhet') @section('_pageTitle', __('sms.show.pageTitle', ['name' => $smsSendout->name])) @section('pagename', __('sms.sendout.headerTitle')) @php $longDate = fn ($date) => \App\Support\DisplayDate::timestamp($date); $smsRows = $smsSendout->sms()->where('type', 1); $total = (clone $smsRows)->count(); $parts = (int) (clone $smsRows)->sum('parts'); $sent = (clone $smsRows)->whereNotNull('third_party_id')->count(); $sentHint = __('sms.nhList.show.sentHint', ['sent' => formatNumber($sent), 'total' => formatNumber($total)]); @endphp @section('page')

{{ $smsSendout->name }}

{{ __('sms.nhList.show.lead') }}

@include('sms.partials.status-pill') {{ $longDate($smsSendout->start_time) }}

@include('partials.nh-report-tabs', ['reportKind' => 'sms', 'reportId' => $smsSendout->id, 'reportTab' => request('tab') === 'receivers' ? 'receivers' : 'overview']) @unless (is_null($smsSendout->abort_time)) {{ __('sms.nhList.show.abortedInfo', ['date' => $longDate($smsSendout->abort_time)]) }} @endunless

{{ __('sms.nhList.show.totals') }}

{{ $sentHint }}.

@if (request('tab') === 'receivers') @include('sms.partials.receivers') @else

{{ $smsSendout->message }}

{{ __('sms.nhList.show.startTime') }}
{{ $longDate($smsSendout->start_time) }}
{{ __('sms.nhList.show.stopTime') }}
{{ $smsSendout->stop_time ? $longDate($smsSendout->stop_time) : __('sms.nhList.show.notYet') }}
@endif
@endsection @push('scripts') @endpush