@extends('layouts.superadmin') @section('title','سقراط — الذكاء الاصطناعي') @section('page-title','🧠 سقراط — الذكاء الاصطناعي') @section('content') @php $m = fn($x)=> number_format((float)$x, 1); @endphp
سقراط • AI • {{ $currentRange['from'] }} → {{ $currentRange['to'] }}

🧠 AI Overview — ProActive Reports

مقارنة الشهر الحالي مع السابق + ملخص توصيات + أفضل/أضعف تقارير (AI Score).

Overall Health
{{ $m($overallMetrics['health_score'] ?? 0) }}%
Reports: {{ number_format($overallMetrics['count'] ?? 0) }}
This Month
{{ $m($currentMetrics['health_score'] ?? 0) }}%
Avg grade: {{ $m($currentMetrics['avg_grade'] ?? 0) }} • Plus: {{ $m($currentMetrics['pct_plus'] ?? 0) }}%
Trend vs Prev
{{ $m($trend['health_delta'] ?? 0) }}%
Issues Δ: {{ $m($trend['issues_delta'] ?? 0) }} • Progress Δ: {{ $m($trend['progress_delta'] ?? 0) }}
{{-- Summary --}}
✅ إيجابيات
@foreach(($aiSummary['positives'] ?? []) as $t)
{{ $t }}
@endforeach
⚠️ مخاطر
@foreach(($aiSummary['risks'] ?? []) as $t)
{{ $t }}
@endforeach
🛠️ خطوات عملية
@foreach(($aiSummary['actions'] ?? []) as $t)
{{ $t }}
@endforeach
{{-- Top / Low --}}
🏆 أفضل 5 تقارير (AI)
Top
@foreach($top5 as $r)
{{ $r['activity_date'] }} • {{ strtoupper($r['platform']) }}
{{ $r['live_owner_name'] ?: '—' }}
{{ \Illuminate\Support\Str::limit($r['short_summary'], 80) }}
AI
{{ $r['ai'] }}
@endforeach
🚨 أضعف 5 تقارير (AI)
Low
@foreach($low5 as $r)
{{ $r['activity_date'] }} • {{ strtoupper($r['platform']) }}
{{ $r['live_owner_name'] ?: '—' }}
{{ \Illuminate\Support\Str::limit($r['short_summary'], 80) }}
AI
{{ $r['ai'] }}
@endforeach
@endsection