{{-- Abuse report table (#2957 slice 16, card #3103). Included by abuseReport/index only. Expects $reports (paginator) and $filters. Toolbar: the same GET filters status and classification with the same values as before. Every value in a row comes from an outside sender and is escaped. The chosen filter is kept in local storage per company and user (interface-preferences.js, data-nh-saved-filter); a visit without filter parameters reopens it, and "Visa alla" sends empty values so it also clears the saved filter. --}} @php $nhArStatuses = ['unresolved', 'matched', 'actioned', 'failed', 'dmarc_processed', 'dmarc_unmatched', 'dmarc_ambiguous', 'dmarc_failed', 'dismissed']; $nhArTypes = ['complaint', 'provider_notice', 'dmarc', 'unknown', 'malformed']; $nhArStatus = (string) ($filters['status'] ?? ''); $nhArType = (string) ($filters['classification'] ?? ''); $nhArFiltered = $nhArStatus !== '' || $nhArType !== ''; $nhArLabel = fn (string $group, ?string $value) => Lang::has('abuseReport.nh.'.$group.'.'.$value) ? __('abuseReport.nh.'.$group.'.'.$value) : (string) $value; @endphp
{{ __('abuseReport.nh.filters') }}
@foreach ($nhArStatuses as $value) @endforeach @foreach ($nhArTypes as $value) @endforeach
{{ __('abuseReport.nh.filter') }}
@if ($reports->isEmpty()) {{ $nhArFiltered ? __('abuseReport.nh.emptyText') : __('abuseReport.nh.emptyTextAll') }} @if ($nhArFiltered) {{ __('abuseReport.nh.showAll') }} @endif @else @foreach ($reports as $report) @php($subject = \Illuminate\Support\Str::limit($report->subject ?? '', 90)) @endforeach
{{ __('abuseReport.nh.columnReport') }} {{ __('abuseReport.nh.type') }} {{ __('abuseReport.nh.status') }} {{ __('abuseReport.nh.columnMatch') }} {{ __('abuseReport.nh.columnActions') }}
{{ $subject !== '' ? $subject : __('abuseReport.nh.noSubject') }} {{ \App\Support\DisplayDate::timestamp($report->reported_at ?: $report->created_at) }} {{ $nhArLabel('types', $report->classification) }} @include('abuseReport.partials.status-pill', ['status' => $report->status]) @if ($report->classification === 'dmarc') {{ optional($report->dmarcReports->first())->policy_domain ?: ($report->match_reason ?: '-') }} @elseif ($report->company_id) C{{ $report->company_id }} / S{{ $report->sendout_id }} / R{{ $report->receiver_id }} @else {{ $report->match_reason ?: '-' }} @endif {{ __('abuseReport.nh.review') }}
{{ __('abuseReport.nh.count', ['count' => formatNumber($reports->total())]) }}
@endif