{{-- Mailing Report Modal Partial --}} @php $statusColors = [ 'draft' => 'bg-gray-100 text-gray-800', 'scheduled' => 'bg-yellow-100 text-yellow-800', 'sending' => 'bg-blue-100 text-blue-800', 'sent' => 'bg-green-100 text-green-800', 'aborted' => 'bg-red-100 text-red-800', 'cancelled' => 'bg-red-100 text-red-800', ]; $statusColor = $statusColors[$mailing->status] ?? 'bg-gray-100 text-gray-800'; @endphp {{-- Header --}}
{{ $mailing->id }}
@if($mailing->sent_at || $mailing->scheduled_at)@if($mailing->sent_at) {{ __('Sent') }}: {{ $mailing->sent_at->format('d M Y H:i') }} @else {{ __('Scheduled') }}: {{ $mailing->scheduled_at->format('d M Y H:i') }} @endif
@endif @if($mailing->sending_started_at) @php $endTime = $mailing->sent_at ?? now(); $durationSeconds = (int) $mailing->sending_started_at->diffInSeconds($endTime, true); $durationHours = intdiv($durationSeconds, 3600); $durationMinutes = intdiv($durationSeconds % 3600, 60); $durationSecs = $durationSeconds % 60; $durationStr = $durationHours > 0 ? sprintf('%dh %dm %ds', $durationHours, $durationMinutes, $durationSecs) : ($durationMinutes > 0 ? sprintf('%dm %ds', $durationMinutes, $durationSecs) : sprintf('%ds', $durationSecs)); @endphp{{ __('Started sending') }}: {{ $mailing->sending_started_at->format('d M Y H:i') }}
{{ $mailing->sent_at ? __('Duration') : __('Running for') }}: {{ $durationStr }}
@endif{{ __('Recipients by Language & Content') }}
@php $rowsByLocaleLocation = $mailing->getRecipientCountsByLocaleAndLocation(); $fallbackLocale = $mailing->fallback_locale ?? ''; @endphp @if(count($rowsByLocaleLocation) > 0)| {{ __('Language') }} | {{ __('Posts') }} | {{ __('Location') }} | {{ __('Recipients') }} |
|---|---|---|---|
| @if($isFirstForLocale) {{ $flag }} {{ $languageName }} @endif | @if($isFirstForLocale) @if($nativePosts > 0) {{ $nativePosts }} {{ __('native') }} @endif @if($fallbackPosts > 0) {{ $fallbackPosts }} {{ __('fallback in') }} {{ $fallbackLanguageName }} @endif @if($missingPosts > 0) {{ $missingPosts }} {{ __('skipped') }} @endif @if($nativePosts === 0 && $fallbackPosts === 0) {{ __('No content') }} @endif @endif | {{ $row['location'] ?: __('Unknown') }} | {{ number_format($row['count']) }} |
{{ __('No recipients found for this mailing type.') }}
@endif{{ __('Send Results') }}
{{-- Progress bar (while sending) --}} @if($mailing->status === 'sending')| {{ __('Successfully sent') }} | {{ number_format($mailing->sent_count) }} |
| {{ __('Failed (delivery error)') }} | @if($mailing->failed_count > 0) {{ number_format($mailing->failed_count) }} @else 0 @endif |
| {{ __('Skipped (hard bounce)') }} | {{ number_format($mailing->skipped_count) }} |
| {{ __('Not sent (aborted)') }} | {{ number_format($mailing->aborted_count) }} |
| {{ __('Bounced (hard)') }} | {{ number_format($bounceStats['hard']) }} |
| {{ __('Bounced (soft)') }} | {{ number_format($bounceStats['soft']) }} |
| {{ __('Complaints') }} | {{ number_format($bounceStats['complaint']) }} |