@extends('layouts.app') @section('title', 'لوحة الموارد البشرية - '.config('app.name')) @section('breadcrumb') الرئيسية الموارد البشرية لوحة التحكم @endsection @php $attendanceRate = $totalActiveEmployees > 0 ? round(($metrics['present_today'] / max($totalActiveEmployees, 1)) * 100, 1) : 0.0; $kpiCards = [ [ 'label' => 'إجمالي الموظفين', 'value' => number_format($totalActiveEmployees), 'sub' => number_format($totalActiveEmployees).' نشط', 'hint' => 'hr.total_employees', 'iconBg' => 'bg-blue-100', 'iconColor' => 'text-blue-600', 'svg' => '', ], [ 'label' => 'الحاضرون اليوم', 'value' => number_format($metrics['present_today']), 'sub' => $attendanceRate.'% معدل الحضور', 'hint' => 'hr.present_today', 'iconBg' => 'bg-emerald-100', 'iconColor' => 'text-emerald-600', 'svg' => '', ], [ 'label' => 'في إجازة اليوم', 'value' => number_format($metrics['on_leave_today']), 'sub' => 'طلبات معلّقة: —', 'hint' => 'hr.on_leave_today', 'iconBg' => 'bg-amber-100', 'iconColor' => 'text-amber-600', 'svg' => '', ], [ 'label' => 'التعيينات الجديدة (الشهر)', 'value' => number_format($metrics['new_hires_month']), 'sub' => 'إنهاء خدمة الشهر: —', 'hint' => 'hr.new_hires_month', 'iconBg' => 'bg-violet-100', 'iconColor' => 'text-violet-600', 'svg' => '', ], [ 'label' => 'الأقسام', 'value' => number_format($departmentCount), 'sub' => null, 'hint' => 'hr.department_count', 'iconBg' => 'bg-sky-100', 'iconColor' => 'text-sky-600', 'svg' => '', ], [ 'label' => 'الغائبون اليوم', 'value' => number_format($metrics['absent_today']), 'sub' => null, 'hint' => 'hr.absent_today', 'iconBg' => 'bg-red-100', 'iconColor' => 'text-red-600', 'svg' => '', ], [ 'label' => 'العمل الإضافي المعلق', 'value' => number_format($metrics['pending_overtime']), 'sub' => null, 'hint' => 'hr.pending_overtime', 'iconBg' => 'bg-orange-100', 'iconColor' => 'text-orange-600', 'svg' => '', ], [ 'label' => 'متوسط الراتب', 'value' => 'ر.س '.number_format($avgSalary, 2), 'sub' => 'للموظفين النشطين', 'hint' => 'hr.avg_salary', 'iconBg' => 'bg-teal-100', 'iconColor' => 'text-teal-600', 'svg' => '', ], ]; @endphp @section('content')

لوحة تحكم الموارد البشرية

نظرة عامة على مقاييس وأنشطة الموارد البشرية

@foreach($kpiCards as $card)
{{ $card['label'] }}
{{ $card['value'] }}
@if(! empty($card['sub']))
{{ $card['sub'] }}
@endif
@endforeach

اتجاه الحضور (آخر 14 يوماً)

عدد تسجيلات الحضور اليومية عند توفر البيانات

توزيع الجنس

@push('scripts') @endpush @endsection