@extends('layouts.client')
@section('title', $document->title)
@section('page-title', $document->title)
@section('page-subtitle', 'Document details')
@section('content')
{{-- Back --}}
Back to My Documents
{{-- Status Banner --}}
@if($document->isRejected())
Document Rejected
@if($document->latestValidation?->comments)
Reason: {{ $document->latestValidation->comments }}
@endif
@elseif($document->isApproved())
Document Approved & Authenticated
@if($document->certificate)
Code: {{ $document->certificate->validation_code }}
@endif
@if($document->certificate)
@endif
@elseif($document->isRevoked())
@endif
{{-- Document Info --}}
Document Information
{{ $document->statusLabel() }}
@php $rows = [
'Title' => $document->title,
'Document Type' => $document->documentType->name,
'Original File' => $document->original_filename,
'File Type' => strtoupper(pathinfo($document->original_filename, PATHINFO_EXTENSION)),
'Submitted' => $document->submitted_at?->format('d M Y H:i'),
'File Hash (SHA-256)' => $document->original_hash ? substr($document->original_hash,0,24).'...' : '—',
]; @endphp
@foreach($rows as $label => $value)
- {{ $label }}
- {{ $value }}
@endforeach
{{-- Certificate Info --}}
@if($document->certificate)
Authentication Certificate & Preview
- Validation Code
- {{ $document->certificate->validation_code }}
- Issued At
- {{ $document->certificate->issued_at->format('d M Y H:i') }}
@if($document->certificate->isRevoked())
- Revoked At
- {{ $document->certificate->revoked_at->format('d M Y H:i') }}
@endif
{{-- Embedded Preview --}}
@php
$authExt = strtolower(pathinfo($document->certificate->authenticated_file_path, PATHINFO_EXTENSION));
$isImg = in_array($authExt, ['jpg', 'jpeg', 'png', 'webp']);
@endphp
Authenticated Document Preview ({{ strtoupper($authExt) }})
@if($isImg)
 }})
@else
@endif
@endif
{{-- Event Timeline --}}
@if($document->events->isNotEmpty())
Activity Timeline
@foreach($document->events as $event)
{{ $event->description }}
{{ $event->created_at->format('d M Y H:i') }}
@endforeach
@endif
@endsection