@extends('layouts.app') @section('title', 'لوحة التحكم - الرواتب والأجور') @section('content')
{{ number_format($total_employees) }}
موظفون نشطون
{{ number_format($total_salary) }}
إجمالي الرواتب (ر.س)
{{ number_format($avg_salary) }}
متوسط الراتب
{{ number_format($total_late_this_month) }}
تأخيرات هذا الشهر

توزيع الرواتب حسب القسم

@forelse($salary_by_dept as $dept)
{{ ($dept->department->name ?? "قسم " . $dept->department_id) ?? 'غير محدد' }} ({{ $dept->count }} موظف) {{ number_format($dept->total) }} ر.س
@php $pct = $total_salary > 0 ? ($dept->total / $total_salary) * 100 : 0; @endphp
@empty

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

@endforelse

عقود تنتهي قريباً

    @forelse($ending_contracts as $contract)
  • {{ ($contract->employee->name ?? "—") ?? '-' }}

    ينتهي: {{ $contract->end_date ? $contract->end_date->format('Y-m-d') : '-' }}

    @php $daysLeft = $contract->end_date ? now()->diffInDays($contract->end_date) : 0; @endphp {{ $daysLeft }} يوم
  • @empty
  • لا توجد عقود منتهية
  • @endforelse
@endsection