@extends('layouts.app')
@section('page_title','My Documents')
@section('page_subtitle','View HR documents uploaded against your profile.')
@section('content')
<div class="card"><table class="table"><tr><th>Title</th><th>Type</th><th>Expiry</th><th>Status</th><th>File</th></tr>@forelse($documents as $document)<tr><td>{{ $document->title }}</td><td>{{ $document->document_type }}</td><td>{{ $document->expiry_date?->format('d M Y') ?? '-' }}</td><td><span class="badge {{ $document->status==='valid'?'green':'yellow' }}">{{ ucfirst($document->status) }}</span></td><td>@if($document->file_path)<a class="btn secondary" target="_blank" href="{{ asset('storage/'.$document->file_path) }}">Open</a>@else - @endif</td></tr>@empty<tr><td colspan="5"><div class="empty">No documents yet.</div></td></tr>@endforelse</table><div class="pagination">{{ $documents->links() }}</div></div>
@endsection
