@extends('admin.layouts.app') @section('title', 'Reports Management') @section('content')

Reports Management

Manage and moderate reported content

Showing {{ $reports->total() }} reports
Content Reports Employer Reports
@include('admin.components.stat_card', ['label' => 'Total Reports', 'value' => $stats['total_reports'] ?? 0, 'icon' => 'fa-solid fa-flag','color' => 'slate']) @include('admin.components.stat_card', ['label' => 'Pending', 'value' => $stats['pending'] ?? $stats['open'] ?? 0, 'icon' => '', 'color' => 'amber']) @include('admin.components.stat_card', ['label' => 'Under Review', 'value' => $stats['under_review'] ?? $stats['in_review'] ?? 0, 'icon' => '', 'color' => 'blue']) @include('admin.components.stat_card', ['label' => 'Resolved', 'value' => $stats['resolved'] ?? $stats['resolved_valid'] ?? 0, 'icon' => '', 'color' => 'emerald']) @include('admin.components.stat_card', ['label' => 'Dismissed', 'value' => $stats['dismissed'] ?? $stats['resolved_invalid'] ?? 0, 'icon' => '', 'color' => 'slate']) @if(isset($stats['critical'])) @include('admin.components.stat_card', ['label' => 'Critical', 'value' => $stats['critical'], 'icon' => 'fa-solid fa-triangle-exclamation', 'color' => 'red']) @endif

Filters

Refine results by status, reason, severity and date
Clear
@csrf @php $headers = [ ['label' => '', 'class' => 'w-12'], ['label' => 'Report', 'class' => ''], ['label' => 'Reporter', 'class' => ''], ['label' => 'Severity', 'class' => 'w-28'], ['label' => 'Status', 'class' => 'w-28'], ['label' => 'Date', 'class' => 'w-36'], ['label' => 'Actions', 'class' => 'text-right w-28'], ]; $rows = []; foreach($reports as $report) { $cells = []; $cells[] = ['content' => '', 'class' => '']; $cells[] = ['content' => '

' . e($report->reason_label ?? $report->type_label ?? 'Report') . '

' . e(Str::limit($report->description, 80)) . '

', 'class' => '']; $reporterName = $report->reporter->name ?? $report->nurse->name ?? 'Anonymous'; $reporterInitial = strtoupper(substr($reporterName, 0, 1)); $cells[] = ['content' => '
' . e($reporterInitial) . '

' . e($reporterName) . '

' . e($report->created_at->diffForHumans()) . '

', 'class' => '']; $cells[] = ['content' => '' . e($report->severity_label) . '', 'class' => '']; $cells[] = ['content' => '' . e(ucfirst(str_replace('_', ' ', $report->status))) . '', 'class' => '']; $cells[] = ['content' => '

' . e($report->created_at->format('M d, Y')) . '

' . e($report->created_at->format('h:i A')) . '

', 'class' => '']; $actions = ''; $cells[] = ['content' => $actions, 'class' => 'text-right']; $rows[] = ['cells' => $cells]; } @endphp @include('admin.components.table_shell', [ 'headers' => $headers, 'rows' => $rows, 'emptyMessage' => 'No reports found', 'pagination' => $reports ])
@push('scripts') @endpush @endsection