@extends('layouts.app') @section('content')
{{ $file->file_subject ?? 'File Details' }}
Reference Number {{ $file->reference_number ?? 'N/A' }}
Department {{ $file->department->name ?? 'N/A' }}
File Series {{ $file->fileSeries->name ?? 'N/A' }}
Created Date {{ $file->created_at ? $file->created_at->format('d M Y') : 'N/A' }}
{{ $file->folios->count() }}
Total Folios
{{ $file->is_active ? 'Active' : 'Inactive' }}
Status
{{ $file->branch->name ?? 'Main' }}
Branch
{{ $file->updated_at ? $file->updated_at->diffForHumans() : 'Never' }}
Last Updated
@php $totalFolios = $file->folios->count(); @endphp @forelse ($file->folios->sortByDesc('created_at') as $index => $folio)
Folio {{ $totalFolios - $loop->index }}
{{ basename($folio->file_path) }}
{{ $folio->created_at ? $folio->created_at->format('d M Y, h:i A') : 'N/A' }}
@empty
No folios available
@endforelse
@if($file->folios->count() > 0) @foreach ($file->folios->sortByDesc('created_at') as $index => $folio)
Folio Details
{{ basename($folio->file_path) }}
Enquirer Name
{{ $folio->folioable ? $folio->folioable->full_name : 'Not Available' }}
Check Number
{{ $folio->folioable ? $folio->folioable->check_number : 'Not Available' }}
File Type
{{ strtoupper(pathinfo($folio->file_path, PATHINFO_EXTENSION)) }}
Upload Date
{{ $folio->created_at ? $folio->created_at->format('d M Y, h:i A') : 'N/A' }}
@if (strtolower(pathinfo($folio->file_path, PATHINFO_EXTENSION)) === 'pdf')
Document Preview
Download
@else
File Actions

This file type cannot be previewed

Download File
@endif
@endforeach @else
No Folio Selected
Select a folio from the list to view details
@endif
@endsection