@php use Illuminate\Support\Facades\Storage; @endphp @extends('layouts.app') @section('title', 'Reviewer Dashboard') @section('content')
{{-- ── HEADER ── --}}

Review Dashboard

Ministry of Fisheries — License Applications

Logged in as {{ auth()->user()->name }}

@csrf
@if (session('success'))
✓ {{ session('success') }}
@endif @if (session('error'))
✗ {{ session('error') }}
@endif {{-- ── STATS ROW ── --}} @php $total = $applications->count(); $pending = $applications->where('status','pending')->count(); $reviewed = $applications->where('status','reviewed')->count(); $approved = $applications->where('status','approved')->count(); $rejected = $applications->where('status','rejected')->count(); $revoked = $applications->where('status','revoked')->count(); @endphp
@foreach([ ['Total', $total, '#0f2a5c', '#e8edf8'], ['Pending', $pending, '#92400e', '#fef3c7'], ['Reviewed', $reviewed, '#1e40af', '#dbeafe'], ['Approved', $approved, '#14532d', '#dcfce7'], ['Rejected', $rejected, '#7f1d1d', '#fee2e2'], ['Revoked', $revoked, '#4c1d95', '#f3e8ff'], ] as [$label, $count, $text, $bg])

{{ $label }}

{{ $count }}

@endforeach
{{-- ── APPLICATIONS LIST ── --}}

License Applications

@forelse($applications as $application) @php $isClaimed = !is_null($application->reviewed_by); $isMyApplication = $application->reviewed_by === auth()->id(); $claimedByName = $isClaimed ? (\App\Models\User::find($application->reviewed_by)?->name ?? 'Another Reviewer') : null; @endphp
{{-- ── Card header ── --}}
{{ $application->license_type }} License {{ ucfirst($application->status) }} {{-- Status badges --}} @if($application->status === 'pending' && $isClaimed) @if($isMyApplication) 📋 Assigned to you @else 🔒 {{ $claimedByName }} @endif @endif @if($application->status === 'reviewed' && $isMyApplication) @if($application->invoice?->proof_of_payment_path) ✓ Payment Uploaded @elseif($application->invoice) ⏳ Awaiting Payment @else 📄 Generate Invoice @endif @endif APP-{{ str_pad($application->id,5,'0',STR_PAD_LEFT) }}
Business: {{ $application->business_name }} Applicant: {{ $application->ap_full_name ?? $application->user?->name }} {{ $application->created_at->format('d M Y') }}
Click to expand
{{-- ── Expandable body ── --}}
{{-- end app-card --}} {{-- PRINTABLE DOCUMENT --}} {{-- end printDoc --}} @empty

No applications found

Applications will appear here once submitted

@endforelse
@endsection