@extends('layouts.app') @section('title', 'إدارة المستندات - DOTS HR Pro') @push('styles') @endpush @section('content')
{{ $documents->total() }} مستند
| المستند | الموظف | النوع | تاريخ الانتهاء | الحالة | تاريخ الرفع | إجراءات |
|---|---|---|---|---|---|---|
|
@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 }}
|
{{ 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') }} | |