@extends('layouts.app') @section('title', 'إدارة تذكيرات الوثائق') @push('styles') @endpush @section('content')

إدارة تذكيرات الوثائق

إدارة التذكيرات
{{-- Stats --}}
منتهية
{{ $stats->expired ?? 0 }}
تنتهي قريباً (30 يوم)
{{ $stats->expiring_30 ?? 0 }}
نشطة
{{ $stats->valid ?? 0 }}
الإجمالي
{{ $stats->total ?? 0 }}
{{-- Dashboard --}}
{{-- By Document Type --}}

حسب نوع الوثيقة

{{ isset($byType) ? count($byType) : 0 }} أنواع
@if(isset($byType) && count($byType) > 0) @foreach($byType as $type)
{{ $type->document_type ?? $type->name ?? '-' }} {{ $type->count ?? 0 }}
@endforeach @else

لا توجد بيانات

@endif
{{-- By Department --}}

حسب القسم

{{ isset($departmentBreakdown) ? count($departmentBreakdown) : 0 }} أقسام
@if(isset($departmentBreakdown) && count($departmentBreakdown) > 0) @foreach($departmentBreakdown as $dept)
{{ $dept->department_name ?? '-' }} {{ $dept->total ?? 0 }}
@endforeach @else

لا توجد بيانات

@endif
{{-- Recent Documents Table --}}

آخر الوثائق

عرض الكل
@if(isset($recentDocs) && count($recentDocs) > 0)
@foreach($recentDocs as $doc) @endforeach
الموظف نوع الوثيقة تاريخ الانتهاء الحالة
{{ $doc->employee_name ?? '-' }} {{ $doc->document_type ?? '-' }} {{ $doc->expiry_date ?? '-' }} @php $today = now()->toDateString(); $status = 'نشطة'; $badgeClass = 'drm-badge-success'; if(isset($doc->expiry_date)) { if($doc->expiry_date < $today) { $status = 'منتهية'; $badgeClass = 'drm-badge-danger'; } elseif($doc->expiry_date <= now()->addDays(30)->toDateString()) { $status = 'تنتهي قريباً'; $badgeClass = 'drm-badge-warning'; } } @endphp {{ $status }}
@else

لا توجد وثائق حديثة

@endif
{{-- Stat Modal --}}
@endsection @push('scripts') @endpush