@extends('layouts.app') @section('title', 'Document Management') @section('content') @php $fq = array_filter(request()->only(['q','category','status','project_id','client_id','supplier_id','file_type','expiry','date_from','date_to','sort','direction','include_archived']), fn ($v) => $v !== null && $v !== ''); $secondaryCats = ['Invoice', 'Quotation', 'BOQ', 'Purchase Order', 'Supplier Bill', 'HR Document', 'Site Update', 'Compliance', 'Other']; @endphp
{{ $err }}
@endforeachTotal documents
{{ $stats['total_documents'] }}
Approved
{{ $stats['approved_documents'] }}
Expiring soon
{{ $stats['expiring_soon'] }}
Storage used
{{ \Illuminate\Support\Number::fileSize($stats['storage_used'] ?? 0) }}
{{ $card['label'] }}
{{ $cnt }} active files
Filter list by category
@endforeachNo documents found
Upload your first project document or adjust filters.
| Document | Category | Linked to | Status | Expiry | Ver | Uploaded | Size | Actions |
|---|---|---|---|---|---|---|---|---|
|
{{ $d->title }}
{{ $d->displayFileName() }} |
{{ $d->document_category }} | @forelse($linkBits as $bit) {{ $bit[2] }} @empty General @endforelse | {{ $d->status }} | {{ $d->expiry_date?->format('M j, Y') ?? '—' }} | v{{ $d->version_number }} |
{{ $d->uploader?->name ?? '—' }} {{ $d->created_at?->format('M j, Y') }} |
{{ \Illuminate\Support\Number::fileSize($d->file_size) }} | View @if($d->file_path) Download @endif @if(!$d->isArchived()) Version @endif |
Upload document
Import metadata
Updates titles, categories, dates, and links for files already stored. Download template