@extends('layouts.superadmin') @section('title', 'تحليلات البلاغات والاعتراضات') @section('content')

تحليلات البلاغات والاعتراضات

نظرة شاملة على إحصائيات وتحليلات البلاغات والاعتراضات

العودة للقائمة

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

{{ $analytics['total_requests'] }}

في آخر {{ $period }} يوم

متوسط وقت الاستجابة

{{ number_format($analytics['response_time'], 1) }}

ساعة للمراجعة

البلاغات

{{ $analytics['by_type']['report'] ?? 0 }}

{{ $analytics['total_requests'] > 0 ? round(($analytics['by_type']['report'] ?? 0) / $analytics['total_requests'] * 100, 1) : 0 }}% من المجموع

الاعتراضات

{{ $analytics['by_type']['objection'] ?? 0 }}

{{ $analytics['total_requests'] > 0 ? round(($analytics['by_type']['objection'] ?? 0) / $analytics['total_requests'] * 100, 1) : 0 }}% من المجموع

توزيع الحالات

@php $totalStatus = array_sum($analytics['by_status']->toArray()); @endphp @foreach(['pending' => 'معلقة', 'approved' => 'مقبولة', 'rejected' => 'مرفوضة'] as $status => $statusText) @php $count = $analytics['by_status'][$status] ?? 0; $percentage = $totalStatus > 0 ? ($count / $totalStatus) * 100 : 0; $colorClass = match($status) { 'pending' => 'bg-yellow-500', 'approved' => 'bg-green-500', 'rejected' => 'bg-red-500', default => 'bg-gray-500' }; @endphp
{{ $statusText }}
{{ number_format($percentage, 1) }}% {{ $count }}
@endforeach

أكثر المرسلين نشاطاً

@forelse($analytics['top_senders'] as $sender)
{{ substr($sender->user->name ?? 'غير محدد', 0, 2) }}

{{ $sender->user->name ?? 'غير محدد' }}

{{ $sender->count }} طلب

{{ $sender->count }}
@empty

لا توجد بيانات متاحة

@endforelse

الطلبات اليومية

تفاصيل الفترة المحددة

المقياس القيمة الوصف
إجمالي الطلبات {{ $analytics['total_requests'] }} جميع البلاغات والاعتراضات
معدل الاستجابة {{ $analytics['total_requests'] > 0 ? number_format((($analytics['by_status']['approved'] ?? 0) + ($analytics['by_status']['rejected'] ?? 0)) / $analytics['total_requests'] * 100, 1) : 0 }}% الطلبات التي تم مراجعتها
معدل القبول {{ $analytics['total_requests'] > 0 ? number_format(($analytics['by_status']['approved'] ?? 0) / $analytics['total_requests'] * 100, 1) : 0 }}% الطلبات المقبولة من المجموع
متوسط وقت المراجعة {{ number_format($analytics['response_time'], 1) }} ساعة من الإرسال حتى المراجعة
@endsection