@php $branchOptions = $branches->pluck('name', 'id')->toArray(); $departmentOptions = $departments->pluck('name', 'id')->toArray(); $hasActiveFilters = filled($filter_q) || filled($filter_date_from) || filled($filter_date_to) || filled($filter_branch_id) || filled($filter_department_id); @endphp
{{-- Header --}}

{{ __('Notification Center') }}

@can('notifications send') @endcan
{{-- Session message --}} @if(session()->has('message'))
{{ session('message') }}
@endif {{-- Errors --}} @if ($errors->any())
@endif {{-- Filters --}}
{{-- Table --}}
@forelse($sentHistory as $log) @php $props = $log->properties ?? []; $scheduled = data_get($props, 'scheduled_at'); $priority = data_get($props, 'priority', 'normal'); $channels = (array) data_get($props, 'channels', []); @endphp @empty @endforelse
# {{ __('Subject / Preview') }} {{ __('Recipients') }} {{ __('Channels') }} {{ __('Priority') }} {{ __('Status') }} {{ __('Created at') }} {{ __('Send time') }}
{{ $loop->iteration + ($sentHistory->currentPage() - 1) * $sentHistory->perPage() }}
{{ $log->description }}
{{ data_get($props, 'body', __('N/A')) }}
@if(count($channels))
@foreach($channels as $ch) {{ __($ch === 'database' ? 'Database' : ($ch === 'mail' ? 'Mail' : ($ch === 'sms' ? 'SMS' : ($ch === 'whatsapp' ? 'WhatsApp' : $ch)))) }} @endforeach
@else - @endif
@if($priority === 'urgent') {{ __($priority) }} @elseif($priority === 'high') {{ __($priority) }} @elseif($priority === 'low') {{ __($priority) }} @else {{ __($priority) }} @endif @if($scheduled) {{ __('Scheduled') }} @else {{ __('Delivered') }} @endif {{ $log->created_at->format('Y-m-d H:i') }} {{ $scheduled }}
{{ __('No notifications sent yet.') }}
{{ $sentHistory->links() }}
{{-- Modal --}}