@extends('layouts.dashboard') @section('content') @php /** * Email delivery log — every transactional message the platform sent, and every one it * could not. A record of outbound mail, not a mailbox: the product sends over SMTP and * never receives, so there is nothing inbound to list. * * @var array $rows the current page, newest first * @var array $counts ['sent'=>int,'pending'=>int,'failed'=>int] across the whole log * @var int $total rows matching the active filter * @var array $pagination paginate() metadata * @var string $status active status filter ('' = all) * @var string $q active search term * @var bool $configured whether SMTP is set up at all */ $statusPill = [ 'sent' => 'qm-pill-green', 'pending' => 'qm-pill-amber', 'failed' => 'qm-pill-red', ]; $statusLabel = [ 'sent' => t_raw('admin.email_log.status_sent'), 'pending' => t_raw('admin.email_log.status_pending'), 'failed' => t_raw('admin.email_log.status_failed'), ]; $hasFilters = $status !== '' || $q !== ''; @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp
| {{ t_raw('admin.email_log.col_recipient') }} | {{ t_raw('admin.email_log.col_subject') }} | {{ t_raw('common.status') }} | {{ t_raw('admin.email_log.col_attempts') }} | {{ t_raw('admin.email_log.col_when') }} | {{ t_raw('common.actions') }} |
|---|---|---|---|---|---|
|
{{ $r['to_email'] }}
{!! or_dash($r['template_key']) !!}
|
{{ $r['subject'] }} | {{ $statusLabel[$st] ?? $st }} @if ($st !== 'sent' && !empty($r['last_error'])) {{ $r['last_error'] }} @endif | {{ (int) $r['attempts'] }} | {!! fmt_datetime($r['sent_at'] ?: $r['created_at']) !!} | @partial('row-actions', ['actions' => [ ['label' => t_raw('common.view'), 'icon' => 'fa-eye', 'href' => '/admin/email-log/' . $rid], ['label' => t_raw('admin.email_log.action_resend'), 'icon' => 'fa-redo', 'form' => ['action' => '/admin/email-log/resend', 'fields' => ['id' => $rid]]], ]]) |