| @lang('quickadmin.files.fields.folder') |
{{ $file->folder->name or '' }} |
| Category |
{{ $file->category->name ?? 'Not classified yet' }} |
| @lang('quickadmin.files.fields.created-by') |
{{ $file->created_by->name or '' }} |
| OCR status |
{{ $file->ocrStatusLabel() }} |
| Approval status |
{{ $file->statusLabel() }} |
@if($file->status == 'rejected' && $file->rejection_reason)
| Rejection reason |
{{ $file->rejection_reason }} |
@endif
@if($file->approved_by)
| Approved by |
{{ $file->approved_by->name }} on {{ optional($file->approved_at)->format('Y-m-d H:i') }} |
@endif
| @lang('quickadmin.files.fields.filename') |
@foreach($file->getMedia('filename') as $media)
{{ $media->name }} ({{ $media->size }} KB)
@endforeach |
OCR extracted text
@if($file->ocr_text)
@else
@if($file->ocr_status == 'processing')
OCR is still running on this document.
@elseif($file->ocr_status == 'failed')
OCR failed for this document - check the file format or the server's OCR setup.
@elseif($file->ocr_status == 'skipped')
No text could be extracted (unsupported file type for OCR).
@else
OCR hasn't run yet.
@endif
@endif
Approval workflow
@php
$s = $file->status;
$isRejected = $s == 'rejected';
@endphp
-
1. Uploaded (draft)
-
2. Submitted for approval
-
3. {{ $isRejected ? 'Rejected' : 'Approved' }}
Actions
@can('file_edit')
@if(in_array($file->status, ['draft', 'rejected']))
{!! Form::open(['method' => 'POST', 'route' => ['admin.files.submit', $file->id]]) !!}
{!! Form::submit('Submit for approval', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@endif
@endcan
@can('file_approve')
@if($file->status == 'pending_approval')
{!! Form::open(['method' => 'POST', 'route' => ['admin.files.approve', $file->id], 'style' => 'display:inline-block; margin-right: 8px;']) !!}
{!! Form::submit('Approve', ['class' => 'btn btn-success']) !!}
{!! Form::close() !!}
{!! Form::open(['method' => 'POST', 'route' => ['admin.files.reject', $file->id], 'style' => 'display:inline-block;']) !!}
{!! Form::text('rejection_reason', old('rejection_reason'), ['class' => 'form-control', 'placeholder' => 'Reason for rejection', 'required' => '', 'style' => 'display:inline-block; width:260px;']) !!}
{!! Form::submit('Reject', ['class' => 'btn btn-danger']) !!}
{!! Form::close() !!}
@endif
@endcan
Approval history
@if($file->approvals->count())
@foreach($file->approvals as $approval)
-
{{ ucfirst($approval->action) }}
by {{ $approval->user->name ?? 'System' }}
on {{ $approval->created_at->format('Y-m-d H:i') }}
@if($approval->comment)
— {{ $approval->comment }}
@endif
@endforeach
@else
No workflow activity yet.
@endif
@lang('quickadmin.qa_back_to_list')