{{-- روابط سريعة --}} {{ __('View Tasks') }} {{ __('View Projects') }} {{ __('Leave Requests') }} {{ __('Employees') }}
{{-- العقود المنتهية --}} @if (($data['endingContracts'] ?? 0) > 0 && in_array($role, ['Admin', 'HR Manager']))
{{ __('There are') }} {{ $data['endingContracts'] }} {{ __('employee contract(s) ending soon.') }} {{ __('Review now') }}
@endif {{-- المهام المتأخرة --}} @if (($data['overdueTasks'] ?? 0) > 0)
{{ __('You have') }} {{ $data['overdueTasks'] }} {{ __('overdue task(s).') }} {{ __('Check now') }}
@endif
{{-- تهيئة $stats --}} @php $stats = []; if ($role === 'Admin' || $role === 'General Manager' || $role === 'HR Manager') { $stats = [ ['label' => 'Attachments', 'value' => $data['AttachmentsCount'], 'icon' => 'fas fa-paperclip', 'color' => 'text-gray-600'], ['label' => 'Administrates', 'value' => $data['AdministratesCount'], 'icon' => 'fas fa-user-shield', 'color' => 'text-rose-600'], ['label' => 'Departments', 'value' => $data['DepartmentsCount'], 'icon' => 'fas fa-building', 'color' => 'text-purple-600'], ['label' => 'Positions', 'value' => $data['PositionsCount'], 'icon' => 'fas fa-briefcase', 'color' => 'text-teal-600'], ['label' => 'Employees', 'value' => $data['EmployeesCount'], 'icon' => 'fas fa-users', 'color' => 'text-indigo-600'], ['label' => 'Documents', 'value' => $data['DocumentsCount'], 'icon' => 'fas fa-file-lines', 'color' => 'text-cyan-600'], ['label' => 'Violations', 'value' => $data['ViolationsCount'], 'icon' => 'fas fa-triangle-exclamation', 'color' => 'text-pink-600'], ['label' => 'Leaves', 'value' => $data['LeavesCount'], 'icon' => 'fas fa-plane-departure', 'color' => 'text-lime-600'], ['label' => 'Custodies', 'value' => $data['CustodiesCount'], 'icon' => 'fas fa-box', 'color' => 'text-orange-600'], ['label' => 'Projects', 'value' => $data['ProjectsCount'], 'icon' => 'fas fa-folder', 'color' => 'text-blue-600'], ['label' => 'Tasks', 'value' => $data['TasksCount'], 'icon' => 'fas fa-list-check', 'color' => 'text-green-600'], ['label' => 'Payslips', 'value' => $data['PayslipsCount'], 'icon' => 'fas fa-file-invoice-dollar', 'color' => 'text-emerald-600'], ['label' => 'Permissions', 'value' => $data['PermissionsCount'], 'icon' => 'fas fa-id-card', 'color' => 'text-sky-600'], ['label' => 'Attendance Requests', 'value' => $data['AttendanceRequestsCount'], 'icon' => 'fas fa-user-clock', 'color' => 'text-fuchsia-600'], ['label' => 'Deputations', 'value' => $data['DeputationsCount'], 'icon' => 'fas fa-route', 'color' => 'text-violet-600'], ['label' => 'Attendances', 'value' => $data['AttendancesCount'], 'icon' => 'fas fa-calendar-check', 'color' => 'text-stone-600'], ['label' => 'Absences', 'value' => $data['AbsencesCount'], 'icon' => 'fas fa-user-times', 'color' => 'text-red-600'], ['label' => 'Purchases', 'value' => $data['PurchasesCount'], 'icon' => 'fas fa-cart-shopping', 'color' => 'text-amber-600'], ['label' => 'Advances', 'value' => $data['AdvancesCount'], 'icon' => 'fas fa-money-bill-wave', 'color' => 'text-green-700'], ['label' => 'Activity Logs', 'value' => $data['ActivityLogsCount'], 'icon' => 'fas fa-clipboard-list', 'color' => 'text-gray-700'], ['label' => 'Candidates', 'value' => $data['CandidatesCount'], 'icon' => 'fas fa-user-tie', 'color' => 'text-yellow-600'], ]; } elseif ($role === 'HR Manager') { $stats = [ ['label' => 'Attachments', 'value' => $data['AttachmentsCount'], 'icon' => 'fas fa-paperclip', 'color' => 'text-gray-600'], ['label' => 'Administrates', 'value' => $data['AdministratesCount'], 'icon' => 'fas fa-user-shield', 'color' => 'text-rose-600'], ['label' => 'Departments', 'value' => $data['DepartmentsCount'], 'icon' => 'fas fa-building', 'color' => 'text-purple-600'], ['label' => 'Positions', 'value' => $data['PositionsCount'], 'icon' => 'fas fa-briefcase', 'color' => 'text-teal-600'], ['label' => 'Employees', 'value' => $data['EmployeesCount'], 'icon' => 'fas fa-users', 'color' => 'text-indigo-600'], ['label' => 'Documents', 'value' => $data['DocumentsCount'], 'icon' => 'fas fa-file-lines', 'color' => 'text-cyan-600'], ['label' => 'Violations', 'value' => $data['ViolationsCount'], 'icon' => 'fas fa-triangle-exclamation', 'color' => 'text-pink-600'], ['label' => 'Leaves', 'value' => $data['LeavesCount'], 'icon' => 'fas fa-plane-departure', 'color' => 'text-lime-600'], ['label' => 'Custodies', 'value' => $data['CustodiesCount'], 'icon' => 'fas fa-box', 'color' => 'text-orange-600'], ['label' => 'Projects', 'value' => $data['ProjectsCount'], 'icon' => 'fas fa-folder', 'color' => 'text-blue-600'], ['label' => 'Tasks', 'value' => $data['TasksCount'], 'icon' => 'fas fa-list-check', 'color' => 'text-green-600'], ['label' => 'Payslips', 'value' => $data['PayslipsCount'], 'icon' => 'fas fa-file-invoice-dollar', 'color' => 'text-emerald-600'], ['label' => 'Permissions', 'value' => $data['PermissionsCount'], 'icon' => 'fas fa-id-card', 'color' => 'text-sky-600'], ['label' => 'Attendance Requests', 'value' => $data['AttendanceRequestsCount'], 'icon' => 'fas fa-user-clock', 'color' => 'text-fuchsia-600'], ['label' => 'Deputations', 'value' => $data['DeputationsCount'], 'icon' => 'fas fa-route', 'color' => 'text-violet-600'], ['label' => 'Attendances', 'value' => $data['AttendancesCount'], 'icon' => 'fas fa-calendar-check', 'color' => 'text-stone-600'], ['label' => 'Absences', 'value' => $data['AbsencesCount'], 'icon' => 'fas fa-user-times', 'color' => 'text-red-600'], ['label' => 'Purchases', 'value' => $data['PurchasesCount'], 'icon' => 'fas fa-cart-shopping', 'color' => 'text-amber-600'], ['label' => 'Advances', 'value' => $data['AdvancesCount'], 'icon' => 'fas fa-money-bill-wave', 'color' => 'text-green-700'], ['label' => 'Activity Logs', 'value' => $data['ActivityLogsCount'], 'icon' => 'fas fa-clipboard-list', 'color' => 'text-gray-700'], ['label' => 'Candidates', 'value' => $data['CandidatesCount'], 'icon' => 'fas fa-user-tie', 'color' => 'text-yellow-600'], ['label' => 'Pending Leaves', 'value' => $data['pendingLeaves'] ?? 0, 'icon' => 'fas fa-clock', 'color' => 'text-red-600'], ]; } elseif (in_array($role, ['General Manager', 'Leader'])) { $stats = [ ['label' => 'Attachments', 'value' => $data['AttachmentsCount'], 'icon' => 'fas fa-paperclip', 'color' => 'text-gray-600'], ['label' => 'Administrates', 'value' => $data['AdministratesCount'], 'icon' => 'fas fa-user-shield', 'color' => 'text-rose-600'], ['label' => 'Departments', 'value' => $data['DepartmentsCount'], 'icon' => 'fas fa-building', 'color' => 'text-purple-600'], ['label' => 'Positions', 'value' => $data['PositionsCount'], 'icon' => 'fas fa-briefcase', 'color' => 'text-teal-600'], ['label' => 'Employees', 'value' => $data['EmployeesCount'], 'icon' => 'fas fa-users', 'color' => 'text-indigo-600'], ['label' => 'Documents', 'value' => $data['DocumentsCount'], 'icon' => 'fas fa-file-lines', 'color' => 'text-cyan-600'], ['label' => 'Violations', 'value' => $data['ViolationsCount'], 'icon' => 'fas fa-triangle-exclamation', 'color' => 'text-pink-600'], ['label' => 'Leaves', 'value' => $data['LeavesCount'], 'icon' => 'fas fa-plane-departure', 'color' => 'text-lime-600'], ['label' => 'Custodies', 'value' => $data['CustodiesCount'], 'icon' => 'fas fa-box', 'color' => 'text-orange-600'], ['label' => 'Projects', 'value' => $data['ProjectsCount'], 'icon' => 'fas fa-folder', 'color' => 'text-blue-600'], ['label' => 'Tasks', 'value' => $data['TasksCount'], 'icon' => 'fas fa-list-check', 'color' => 'text-green-600'], ['label' => 'Payslips', 'value' => $data['PayslipsCount'], 'icon' => 'fas fa-file-invoice-dollar', 'color' => 'text-emerald-600'], ['label' => 'Permissions', 'value' => $data['PermissionsCount'], 'icon' => 'fas fa-id-card', 'color' => 'text-sky-600'], ['label' => 'Attendance Requests', 'value' => $data['AttendanceRequestsCount'], 'icon' => 'fas fa-user-clock', 'color' => 'text-fuchsia-600'], ['label' => 'Deputations', 'value' => $data['DeputationsCount'], 'icon' => 'fas fa-route', 'color' => 'text-violet-600'], ['label' => 'Attendances', 'value' => $data['AttendancesCount'], 'icon' => 'fas fa-calendar-check', 'color' => 'text-stone-600'], ['label' => 'Absences', 'value' => $data['AbsencesCount'], 'icon' => 'fas fa-user-times', 'color' => 'text-red-600'], ['label' => 'Purchases', 'value' => $data['PurchasesCount'], 'icon' => 'fas fa-cart-shopping', 'color' => 'text-amber-600'], ['label' => 'Advances', 'value' => $data['AdvancesCount'], 'icon' => 'fas fa-money-bill-wave', 'color' => 'text-green-700'], ['label' => 'Activity Logs', 'value' => $data['ActivityLogsCount'], 'icon' => 'fas fa-clipboard-list', 'color' => 'text-gray-700'], ['label' => 'Candidates', 'value' => $data['CandidatesCount'], 'icon' => 'fas fa-user-tie', 'color' => 'text-yellow-600'], ['label' => 'Team Tasks', 'value' => $data['myTeamTasks'] ?? 0, 'icon' => 'fas fa-people-group', 'color' => 'text-green-600'], ['label' => 'Pending Approvals', 'value' => $data['pendingApprovals'] ?? $data['pendingLeaves'] ?? 0, 'icon' => 'fas fa-file-circle-check', 'color' => 'text-blue-600'], ]; } else { $stats = [ ['label' => 'Documents', 'value' => $data['DocumentsCount'], 'icon' => 'fas fa-file-lines', 'color' => 'text-cyan-600'], ['label' => 'Violations', 'value' => $data['ViolationsCount'], 'icon' => 'fas fa-triangle-exclamation', 'color' => 'text-pink-600'], ['label' => 'Leaves', 'value' => $data['LeavesCount'], 'icon' => 'fas fa-plane-departure', 'color' => 'text-lime-600'], ['label' => 'Custodies', 'value' => $data['CustodiesCount'], 'icon' => 'fas fa-box', 'color' => 'text-orange-600'], ['label' => 'Projects', 'value' => $data['ProjectsCount'], 'icon' => 'fas fa-folder', 'color' => 'text-blue-600'], ['label' => 'Tasks', 'value' => $data['TasksCount'], 'icon' => 'fas fa-list-check', 'color' => 'text-green-600'], ['label' => 'Payslips', 'value' => $data['PayslipsCount'], 'icon' => 'fas fa-file-invoice-dollar', 'color' => 'text-emerald-600'], ['label' => 'Permissions', 'value' => $data['PermissionsCount'], 'icon' => 'fas fa-id-card', 'color' => 'text-sky-600'], ['label' => 'Attendance Requests', 'value' => $data['AttendanceRequestsCount'], 'icon' => 'fas fa-user-clock', 'color' => 'text-fuchsia-600'], ['label' => 'Deputations', 'value' => $data['DeputationsCount'], 'icon' => 'fas fa-route', 'color' => 'text-violet-600'], ['label' => 'Attendances', 'value' => $data['AttendancesCount'], 'icon' => 'fas fa-calendar-check', 'color' => 'text-stone-600'], ['label' => 'Absences', 'value' => $data['AbsencesCount'], 'icon' => 'fas fa-user-times', 'color' => 'text-red-600'], ['label' => 'Purchases', 'value' => $data['PurchasesCount'], 'icon' => 'fas fa-cart-shopping', 'color' => 'text-amber-600'], ['label' => 'Advances', 'value' => $data['AdvancesCount'], 'icon' => 'fas fa-money-bill-wave', 'color' => 'text-green-700'], ['label' => 'Activity Logs', 'value' => $data['ActivityLogsCount'], 'icon' => 'fas fa-clipboard-list', 'color' => 'text-gray-700'], ]; } @endphp {{-- عرض الإحصائيات --}} @foreach ($stats as $stat)

{{ __($stat['label']) }}

{{ $stat['value'] }}

@endforeach {{-- بطاقات Blade إضافية --}} @if ($role === 'Employee') @endif
{{-- المرفقات المعلقة --}} @if ($data['pendingAttachments']->isNotEmpty())

{{ __('Pending Attachments') }}

@endif