{{ $documentReview->title }}

@php $statusMap = [ 'approved' => ['bg-green-50', 'text-green-700', 'ring-green-200', 'bg-green-500'], 'rejected' => ['bg-red-50', 'text-red-700', 'ring-red-200', 'bg-red-500'], 'in_review' => ['bg-yellow-50', 'text-yellow-800', 'ring-yellow-200', 'bg-yellow-500'], 'changes_requested' => ['bg-orange-50', 'text-orange-800', 'ring-orange-200', 'bg-orange-500'], ]; $sc = $statusMap[$documentReview->status] ?? ['bg-gray-50', 'text-gray-700', 'ring-gray-200', 'bg-gray-400']; @endphp {{ strtoupper(str_replace('_', ' ', $documentReview->status)) }}

{{ $documentReview->reference_no }} • v{{ $documentReview->current_version }} • {{ $documentReview->category }} • created {{ $documentReview->created_at->format('M d, Y H:i') }} by {{ $documentReview->user->name }}

Back Open PDF Download Print @if($isOwner && in_array($documentReview->status, ['draft', 'changes_requested', 'rejected'])) Edit @endif
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif

Request Overview

{{ strtoupper(str_replace('_', ' ', $documentReview->status)) }}
Reference{{ $documentReview->reference_no }} • v{{ $documentReview->current_version }}
Priority @php $prMap = ['urgent' => ['bg-red-50', 'text-red-700', 'ring-red-200', 'bg-red-500'], 'high' => ['bg-orange-50', 'text-orange-700', 'ring-orange-200', 'bg-orange-500'], 'low' => ['bg-blue-50', 'text-blue-700', 'ring-blue-200', 'bg-blue-500']]; $pc = $prMap[$documentReview->priority] ?? ['bg-gray-50', 'text-gray-700', 'ring-gray-200', 'bg-gray-400']; @endphp {{ $documentReview->priority }}
Due Date{{ $documentReview->due_date?->format('M d, Y') ?? '—' }}@if($documentReview->due_date && $documentReview->due_date->isPast() && $documentReview->status !== 'approved')OVERDUE@endif
Category{{ $documentReview->category }}
@if($documentReview->description)

Description — {{ $documentReview->description }}

@endif
{{ $documentReview->department->name ?? '—' }} {{ $documentReview->approval_mode }} approval @if($documentReview->is_confidential) Confidential@endif @if($documentReview->tags)Tags: {{ implode(', ', $documentReview->tags) }}@endif

Approval Workflow ({{ $documentReview->approval_mode }})

@if($canApprove)ACTION REQUIRED@endif {{ $documentReview->progressPercent() }}%
{{ $documentReview->approvers->where('status', 'approved')->count() }}/{{ $documentReview->approvers->count() }} approved
    @foreach($documentReview->approvers as $idx => $ap) @php $isNext = $documentReview->getNextApprover()?->id === $ap->id; $node = match($ap->status) { 'approved' => ['bg-green-500', 'text-white', 'ring-green-200', ''], 'rejected' => ['bg-red-500', 'text-white', 'ring-red-200', ''], 'changes_requested' => ['bg-amber-500', 'text-white', 'ring-amber-200', ''], default => $isNext ? ['bg-indigo-600', 'text-white', 'ring-indigo-200', ''] : ['bg-gray-200', 'text-gray-500', 'ring-gray-100', '' . ($idx + 1) . ''], }; $pill = match($ap->status) { 'approved' => 'bg-green-50 text-green-700 ring-green-200', 'rejected' => 'bg-red-50 text-red-700 ring-red-200', 'changes_requested' => 'bg-amber-50 text-amber-700 ring-amber-200', default => $isNext ? 'bg-indigo-50 text-indigo-700 ring-indigo-200' : 'bg-gray-50 text-gray-500 ring-gray-200', }; @endphp
  1. @if(!$loop->last) @endif
    {!! $node[3] !!}
    Step {{ $idx + 1 }} @if($isNext && $ap->status === 'pending')NEXT@endif {{ strtoupper(str_replace('_', ' ', $ap->status)) }}

    {{ $ap->user->name }}

    @if($ap->decided_at)

    {{ $ap->decided_at->format('M d, Y H:i') }}

    @endif @if($ap->notes)

    {{ $ap->notes }}

    @endif
  2. @endforeach
@if($canApprove)
@endif @if($isOwner && in_array($documentReview->status, ['changes_requested', 'rejected']))

Upload New Version — Max 32MB

@csrf
@endif

PDF Preview

Page 1 / ?
120%

Loading PDF...

{{ $documentReview->file_name }}

Click anywhere on the PDF to pin a comment to that page and position.
@foreach($documentReview->versions as $ver)

Version {{ $ver->version }} @if($ver->version == $documentReview->current_version)CURRENT@endif

{{ $ver->file_name }} • {{ number_format($ver->file_size / 1024, 1) }} KB

by {{ $ver->uploader->name }} • {{ $ver->created_at->format('M d, Y H:i') }}

@if($ver->change_notes)

"{{ $ver->change_notes }}"

@endif
Download
@endforeach

Comments {{ $documentReview->allComments()->count() }}

@if($canComment)
@csrf

PDF/JPG/PNG/DOC/XLS up to 10MB each

@else
You don't have permission to comment on this confidential document.
@endif
@forelse($documentReview->allComments()->with(['user', 'replies.user', 'resolver'])->whereNull('parent_id')->orderBy('created_at', 'desc')->get() as $c)
{{ $c->user->name }} {{ $c->created_at->diffForHumans() }} @if($c->page_number) Page {{ $c->page_number }}@endif @if($c->is_resolved)✓ Resolved@endif

{!! $c->rendered_content !!}

@if($c->attachments)
@foreach($c->attachments as $att) {{ basename($att) }} @endforeach
@endif
| @if($c->user_id === auth()->id() || auth()->user()->hasRole('admin'))
@csrf @method('DELETE')
@endif
@csrf @method('PATCH')
@if($c->replies->count() > 0)
@foreach($c->replies as $rep)

{{ $rep->user->name }} {{ $rep->created_at->diffForHumans() }}

{!! $rep->rendered_content !!}

@if($rep->attachments)
@foreach($rep->attachments as $att) {{ basename($att) }} @endforeach
@endif
@endforeach
@endif
@empty

No comments yet. Be the first to pin a comment on the PDF!

@endforelse
Document Info @if($isOwner || auth()->user()->hasRole('admin'))
@csrf @method('DELETE')
@endif

File: {{ $documentReview->file_name }} ({{ number_format(($documentReview->file_size ?? 0) / 1024, 1) }} KB)

Owner: {{ $documentReview->user->name }} • {{ $documentReview->user->email }}

Updated: {{ $documentReview->updated_at->format('M d, Y H:i') }}

@push('scripts') @endpush