{{-- resources/views/superadmin/proactive-intelligence/pulse.blade.php --}} @extends('layouts.superadmin') @section('title','نبض ProActive الذكي — مراقبة الحالة') @section('page-title','📡 نبض ProActive الذكي — مراقبة الحالة الحالية') @section('content') @php $pulse = $pulse ?? []; $window = $pulse['window'] ?? []; $current = $pulse['current'] ?? []; $trend = $pulse['trend'] ?? []; $health = $pulse['health'] ?? []; $highlights = $pulse['highlights'] ?? []; $from = $window['from'] ?? null; $to = $window['to'] ?? null; $cnt = $current['count'] ?? 0; $issues = $current['issues'] ?? 0; $progress = $current['progress'] ?? 0; $plus = $current['plus'] ?? 0; $excellent = $current['excellent'] ?? 0; $pctIssues = $current['pct_issues'] ?? 0; $pctProgress = $current['pct_progress'] ?? 0; $pctPlus = $current['pct_plus'] ?? 0; $pctExcellent= $current['pct_excellent']?? 0; $trendPct = $trend['trend_pct'] ?? null; $trendLabel = $trend['trend_label']?? 'غير معروف'; $trendType = $trend['trend_type'] ?? 'neutral'; $prevCount = $trend['prev_count'] ?? 0; $healthScore = $health['score'] ?? 0; $healthStatus= $health['status'] ?? 'غير محدد'; $statusColor = $health['statusColor'] ?? 'slate'; $healthNote = $health['note'] ?? ''; $positives = $highlights['positives'] ?? []; $risks = $highlights['risks'] ?? []; $actions = $highlights['actions'] ?? []; @endphp
{{-- HERO --}}

نبض ProActive الذكي

متابعة سريعة لحالة ProActive خلال آخر 30 يوم: حجم التقارير، نسبة المشاكل والتقدم، نسبة PLUS، ومؤشر صحة عام مبني على هذه العوامل.

تحليل فترة متحركة (30 يوم) منبثق من بيانات جدول التقارير
@if($from && $to)
الفترة الحالية: من {{ $from }} إلى {{ $to }}
@endif
{{-- مؤشر الصحة --}}
مؤشر صحة ProActive
حالة: {{ $healthStatus }}
{{ $healthScore }}
من 100
@php $barColor = 'bg-slate-200'; if($statusColor === 'emerald') $barColor = 'bg-emerald-300'; elseif($statusColor === 'sky') $barColor = 'bg-sky-300'; elseif($statusColor === 'amber') $barColor = 'bg-amber-300'; elseif($statusColor === 'rose') $barColor = 'bg-rose-300'; @endphp
@if($healthNote)

{{ $healthNote }}

@endif
{{-- أرقام الفترة الحالية + الترند --}}
عدد التقارير (آخر 30 يوم)
{{ $cnt }}
@if(!is_null($trendPct))
ترند مقابل 30 يوم السابقة: {{ $trendPct > 0 ? '+' : ''}}{{ $trendPct }}% ({{ $trendLabel }})
@else
لا توجد فترة سابقة كافية للمقارنة.
@endif
تقارير فيها تقدم
{{ $progress }}
نسبة: {{ $pctProgress }}%
تقارير فيها مشاكل
{{ $issues }}
نسبة: {{ $pctIssues }}%
PLUS / ممتاز
PLUS: {{ $plus }} ({{ $pctPlus }}%)
ممتاز: {{ $excellent }} ({{ $pctExcellent }}%)
{{-- إيجابي / مخاطر / خطوات عملية --}}
{{-- إيجابيات --}}
نقاط قوة في نبض ProActive
@forelse($positives as $p)
{{ $p }}
@empty

لا توجد نقاط قوة واضحة حاليًا — زيادة عدد التقارير وتحسين جودتها سيساعد في ظهور الإيجابيات.

@endforelse
{{-- مخاطر --}}
إشارات تحتاج انتباه
@forelse($risks as $r)
{{ $r }}
@empty

لا توجد إشارات خطرة حاليًا، لكن يُنصح بمراقبة نسبة المشاكل والتقدم كل أسبوعين.

@endforelse
{{-- خطوات عملية --}}
خطوات عملية مقترحة للفترة القادمة
@forelse($actions as $a)
{{ $a }}
@empty

لا توجد توصيات خاصّة الآن — عند زيادة عدد التقارير واختلاف نتائجها ستظهر لك خطوات عملية أوضح.

@endforelse
@endsection