@section('title', 'التحليلات والتقارير') @section('page-title', 'التحليلات والتقارير') @section('page-description', 'تحليلات مفصلة وتقارير شاملة لأداء الشركة')

إجمالي المحطات

{{ $analytics['stations_by_status']->sum() }}

المحطات النشطة

{{ $analytics['stations_by_status']['active'] ?? 0 }}

إجمالي الموظفين

{{ $analytics['employees_by_type']->sum() }}

مديري المحطات

{{ $analytics['employees_by_type']['station_manager'] ?? 0 }}

المحطات حسب الحالة

@foreach($analytics['stations_by_status'] as $status => $count) @php $statusColors = [ 'active' => ['bg-green-500', 'text-green-700', 'نشطة'], 'inactive' => ['bg-red-500', 'text-red-700', 'غير نشطة'], 'under_maintenance' => ['bg-yellow-500', 'text-yellow-700', 'قيد الصيانة'], ]; $color = $statusColors[$status] ?? ['bg-gray-500', 'text-gray-700', $status]; $percentage = $analytics['stations_by_status']->sum() > 0 ? ($count / $analytics['stations_by_status']->sum()) * 100 : 0; @endphp
{{ $color[2] }}
{{ $count }} ({{ number_format($percentage, 1) }}%)
@endforeach

الموظفين حسب النوع

@foreach($analytics['employees_by_type'] as $type => $count) @php $typeColors = [ 'station_manager' => ['bg-blue-500', 'text-blue-700', 'مدير محطة'], 'supervisor' => ['bg-purple-500', 'text-purple-700', 'مشرف'], 'staff' => ['bg-green-500', 'text-green-700', 'موظف'], 'operator' => ['bg-orange-500', 'text-orange-700', 'عامل تشغيل'], ]; $color = $typeColors[$type] ?? ['bg-gray-500', 'text-gray-700', $type]; $percentage = $analytics['employees_by_type']->sum() > 0 ? ($count / $analytics['employees_by_type']->sum()) * 100 : 0; @endphp
{{ $color[2] }}
{{ $count }} ({{ number_format($percentage, 1) }}%)
@endforeach