@extends('layouts.app') @section('title', 'إدارة المستندات - DOTS HR Pro') @push('styles') @endpush @section('content') {{-- Stats --}} @php $expiredDocs = $documents->filter(fn($d) => $d->expiry_date && $d->is_expired); $expiringDocs = $documents->filter(fn($d) => $d->expiry_date && $d->is_expiring_soon && !$d->is_expired); @endphp
{{ $totalDocs }}
إجمالي المستندات
{{ $expiredCount }}
منتهية الصلاحية
{{ $expiringSoonCount }}
تنتهي قريباً (30 يوم)
{{-- Filters --}}
@if(array_filter($filters)) إعادة ضبط @endif
{{-- Table --}}
@forelse($documents as $doc) @empty @endforelse
المستند الموظف النوع تاريخ الانتهاء الحالة تاريخ الرفع إجراءات
@php $ext = strtolower(pathinfo($doc->file_name ?? '', PATHINFO_EXTENSION)); $iconClass = match(true) { $ext === 'pdf' => 'pdf', in_array($ext, ['jpg','jpeg','png']) => 'img', in_array($ext, ['doc','docx']) => 'doc', in_array($ext, ['xls','xlsx']) => 'xls', default => 'other', }; $iconName = match($iconClass) { 'pdf' => 'fa-file-pdf', 'img' => 'fa-file-image', 'doc' => 'fa-file-word', 'xls' => 'fa-file-excel', default => 'fa-file', }; @endphp
{{ $doc->title }}
{{ $doc->file_name }}
{{ mb_substr($doc->employee->first_name ?? '?', 0, 1) }}
{{ $doc->employee->full_name ?? '—' }}
{{ $typeLabels[$doc->type] ?? $doc->type }} {{ $doc->expiry_date ? $doc->expiry_date->format('Y/m/d') : '—' }} @if(!$doc->expiry_date) بدون انتهاء @elseif($doc->is_expired) منتهية @elseif($doc->is_expiring_soon) تنتهي قريباً @else سارية @endif {{ $doc->created_at->format('Y/m/d') }}
@csrf @method('DELETE')

لا توجد مستندات

ابدأ برفع مستندات الموظفين

رفع مستند
@if($documents->hasPages())
{{ $documents->links() }}
@endif
{{-- Stat Card Modals --}} @endsection