@extends('admin.layout.index') @section('title', 'Notification Details') @section('content')

NOTIFICATION ID: #NTF-{{ str_pad($notification->id, 3, '0', STR_PAD_LEFT) }}

Back to Notifications

Total Sent

{{ number_format($notification->total_sent) }}

Delivered

@if ($notification->total_delivered >= 1000) {{ number_format($notification->total_delivered / 1000, 2) }}k @else {{ number_format($notification->total_delivered) }} @endif

Failed

{{ number_format($notification->total_failed) }}

{{--

Opened

@php $totalOpened = $notification->logs()->whereNotNull('opened_at')->count(); @endphp @if ($totalOpened >= 1000) {{ number_format($totalOpened / 1000, 2) }}k @else {{ number_format($totalOpened) }} @endif

--}}
Notification Information
{{ $notification->title }}
@php $badgeClass = match ($notification->target_os) { 'android' => 'bg-success', 'ios' => 'bg-info', 'all' => 'bg-primary', default => 'bg-secondary', }; @endphp {{ ucfirst($notification->target_os) }}
{{ $notification->scheduled_at ? $notification->scheduled_at->format('Y-m-d h:i A') : $notification->created_at->format('Y-m-d h:i A') }}
@php $statusBadge = match ($notification->status) { 'delivered' => 'bg-success', 'scheduled' => 'bg-warning', 'processing' => 'bg-info', 'failed' => 'bg-danger', 'pending' => 'bg-secondary', default => 'bg-secondary', }; @endphp {{ ucfirst($notification->status) }}

{{ $notification->message }}

{{-- Delivery Logs Section - Commented for future use --}} {{--
Delivery Logs
User ID Device OS Version Status Delivered At Opened At
USR-1024 Samsung Galaxy S21 Android 12 Delivered 2024-06-12 09:00:15 2024-06-12 09:02:34
USR-1042 Google Pixel 6 Android 13 Delivered 2024-06-12 09:00:22 2024-06-12 09:05:12
USR-1089 OnePlus 9 Android 11 Failed - -
USR-1123 Xiaomi Mi 11 Android 12 Delivered 2024-06-12 09:00:45 -
USR-1156 Samsung Galaxy A52 Android 12 Delivered 2024-06-12 09:01:02 2024-06-12 09:03:18
--}} @endsection @push('custom-script') {{-- Scripts for delivery logs - Commented for future use --}} {{-- --}} @endpush