@extends('admin.layouts.app') @section('panel') @php $request = request(); $tableName = 'notification_history'; $tableConfiguration = $tableConfiguration = tableConfiguration($tableName); $types = App\Models\NotificationLog::notificationTypes(); $senders = App\Models\NotificationLog::select('sender')->distinct('sender')->get()->pluck('sender')->toArray(); $columns = collect([prepareTableColumn('created_at', 'Sent At', 'showDateTime("$item->created_at", "d M, Y h:i A")', filter: 'date'), prepareTableColumn('account_number', 'Account No.', link: '$item->user_id ? route("admin.users.detail", $item->user_id) : "#"'), prepareTableColumn('username', 'Username', link: 'route("admin.users.detail", $item->user_id)'), prepareTableColumn('notification_type', 'Type', filter: 'select', filterOptions: $types), prepareTableColumn('sender', 'Sender', filter: 'select', filterOptions: $senders), prepareTableColumn('subject', 'Subject')]); if ($tableConfiguration) { $visibleColumns = $tableConfiguration->visible_columns; } else { $visibleColumns = $columns->pluck('id')->toArray(); } $action = [ 'name' => 'Action', 'show' => can('admin.report.email.details') ]; @endphp @slot('tbody') @forelse($logs as $log) @can('admin.report.email.details') @endif @empty {{ __($emptyMessage) }} @endforelse @endslot @endsection @push('breadcrumb-plugins') @if (@$user) @lang('Send Notification') @endif @endpush @push('script') @endpush