@extends('layouts.admin') @section('title', 'Admin Dashboard') @section('page-title', 'Dashboard') @section('page-subtitle', 'System overview') @section('content')
{{-- Stats Cards --}}
@php $cards = [ ['label'=>'Total Clients', 'value'=>$stats['total_clients'], 'icon'=>'users', 'color'=>'blue'], ['label'=>'Total Documents', 'value'=>$stats['total_documents'], 'icon'=>'files', 'color'=>'indigo'], ['label'=>'Pending Review', 'value'=>$stats['pending'], 'icon'=>'clock', 'color'=>'yellow'], ['label'=>'Approved', 'value'=>$stats['approved'], 'icon'=>'check-circle', 'color'=>'green'], ['label'=>'Rejected', 'value'=>$stats['rejected'], 'icon'=>'x-circle', 'color'=>'red'], ['label'=>'Verifications', 'value'=>$stats['verification_total'], 'icon'=>'scan-line', 'color'=>'purple'], ]; @endphp @foreach($cards as $card)
{{ $card['label'] }}

{{ $card['value'] }}

@endforeach
{{-- Pending Documents --}}

Awaiting Validation

View all
@if($recentDocuments->isEmpty())
All documents reviewed!
@else
@foreach($recentDocuments as $doc)
{{ $doc->title }}

{{ $doc->user->name }} • {{ $doc->documentType->name }}

{{ $doc->statusLabel() }} Review
@endforeach
@endif
{{-- Recent Verifications --}}

Recent Verifications

View all
@if($recentVerifications->isEmpty())
No verifications yet.
@else
@foreach($recentVerifications as $log)
@php $resultColor = match($log->verification_result){ 'valid','hash_match','authenticated_match','original_match'=>'green', 'revoked'=>'gray', default=>'red' }; @endphp

{{ $log->certificate?->document?->title ?? 'Unknown document' }}

{{ ucfirst(str_replace('_',' ',$log->verification_result)) }} • {{ $log->verified_at->diffForHumans() }}

{{ $log->ip_address }}
@endforeach
@endif
@endsection