@extends('admin.layouts.app') @section('title', admin_trans('delivery_report')) @section('page-title', admin_trans('delivery_report') . ' - ' . Str::limit($notification->title, 30)) @section('content')
{{ admin_trans('back_to_notification') }}
{{ admin_trans('export_report') }}
@php $typeColors = [ 'system' => 'info', 'promotional' => 'warning', 'offer' => 'success', 'store' => 'primary', 'brand' => 'secondary', 'user' => 'purple' ]; $statusColors = [ 'pending' => 'warning', 'sent' => 'success', 'failed' => 'danger' ]; @endphp

{{ $notification->title }}

{{ admin_trans($notification->type) }} {{ admin_trans($notification->status) }} {{ $notification->created_at->format('M d, Y H:i') }}
@php $totalDeliveries = $deliveries->total(); $sentCount = $deliveries->where('status', 'sent')->count() + $deliveries->where('status', 'read')->count(); $readCount = $deliveries->where('status', 'read')->count(); $failedCount = $deliveries->where('status', 'failed')->count(); $pendingCount = $deliveries->where('status', 'pending')->count(); @endphp

{{ admin_trans('delivery_details') }}

@foreach($notification->channels as $channel) @endforeach
@if ($deliveries->isEmpty()) @else @foreach($deliveries as $delivery)
{{ substr($delivery->user->name, 0, 1) }}
{{ $delivery->user->name }}
{{ $delivery->user->email }}
@if($delivery->user->phone)
{{ $delivery->user->phone }}
@endif
@php $channelIcons = [ 'database' => 'database', 'push' => 'smartphone', 'email' => 'mail' ]; $channelColors = [ 'database' => 'info', 'push' => 'warning', 'email' => 'secondary' ]; @endphp
{{ admin_trans($delivery->channel) }}
@php $deliveryStatusColors = [ 'pending' => 'warning', 'sent' => 'info', 'read' => 'success', 'failed' => 'danger' ]; $deliveryStatusIcons = [ 'pending' => 'clock', 'sent' => 'send', 'read' => 'eye', 'failed' => 'x-circle' ]; @endphp {{ admin_trans($delivery->status) }} @if($delivery->status !== 'pending' && $delivery->created_at)
{{ $delivery->created_at->format('M d, H:i') }}
{{ $delivery->created_at->diffForHumans() }}
@else - @endif
@if($delivery->read_at)
{{ $delivery->read_at->format('M d, H:i') }}
{{ $delivery->read_at->diffForHumans() }}
@else - @endif
@if($delivery->user->devices->isNotEmpty()) @php $device = $delivery->user->devices->first(); @endphp
{{ ucfirst($device->platform ?? 'Unknown') }}
@if($device->app_version)
v{{ $device->app_version }}
@endif @if($device->ip_country)
{{ $device->ip_country }}
@endif
@else {{ admin_trans('no_device') }} @endif
@endforeach
@if ($deliveries->hasPages())
@endif @endif

{{ admin_trans('export_information') }}

{{ admin_trans('delivery_report_export_description') }}

{{ admin_trans('download_csv_report') }}
@endsection @push('scripts') @endpush