@extends('layouts.app') @section('title', 'Customer Document Vault') @section('content')
@include('tenant.partials.typist-page-nav')
Secure customer records

Document vault

Find passports, Emirates IDs, visas and certificates, then act before expiry interrupts a service.

@foreach([ ['Current documents', $metrics['total'], 'bg-violet-100 text-violet-700'], ['Valid beyond 60 days', $metrics['valid'], 'bg-emerald-100 text-emerald-700'], ['Expiring in 60 days', $metrics['expiring'], 'bg-orange-100 text-orange-700'], ['Expired', $metrics['expired'], 'bg-red-100 text-red-700'], ] as [$label, $value, $tone])
{{ $label }}
{{ number_format($value) }}
@endforeach
Reset
@forelse($documents as $document) @php $expired = $document->expiry_date && $document->expiry_date->isPast(); $expiring = !$expired && $document->expiry_date && $document->expiry_date->lte(today()->addDays(60)); $healthLabel = $expired ? 'Expired' : ($expiring ? 'Expiring soon' : 'Valid'); $healthTone = $expired ? 'bg-red-100 text-red-700' : ($expiring ? 'bg-orange-100 text-orange-700' : 'bg-emerald-100 text-emerald-700'); @endphp @empty @endforelse
CustomerDocumentNumberExpiryHealthVersionSecure file
{{ $document->customer?->full_name_en ?? 'Customer unavailable' }}{{ $document->customer?->customer_code }} · {{ $document->customer?->contact?->primary_mobile ?? 'No mobile' }} {{ $document->document_name }}{{ $document->documentType?->name_en ?? 'Customer document' }} {{ $document->document_number ?: 'Not recorded' }} {{ $document->expiry_date?->format('d M Y') ?? 'No expiry' }}@if($document->expiry_date){{ $document->expiry_date->diffForHumans() }}@endif {{ $healthLabel }} v{{ $document->version }}{{ str($document->verification_status)->replace('_',' ')->title() }}
PreviewDownloadHistory@if($document->verification_status==='pending_verification')
@csrf
@endif
No documents foundAdjust the filters or upload documents from a customer profile.Find a customer
@if($documents->hasPages())
{{ $documents->links() }}
@endif
@endsection