{{-- resources/views/superadmin/proactive/command/index.blade.php --}} @extends('layouts.superadmin') @section('title', 'ProActive — مركز القيادة') @section('page-title', 'ProActive Command Center') @section('content') @php use Illuminate\Support\Facades\Route; if (!function_exists('safe_route')) { function safe_route(string $name, array $params = [], bool $absolute = true, string $fallback = '#'): string { try { return Route::has($name) ? route($name, $params, $absolute) : $fallback; } catch (\Throwable $e) { return $fallback; } } } @endphp @php // Helpers $qs = request()->query(); $q = fn($k,$d=null) => request()->get($k,$d); $today = $today ?? now()->toDateString(); $todayTotal = (int)($todayTotal ?? 0); $todayActiveNow = (int)($todayActiveNow ?? 0); $lateCount = (int)($lateCount ?? 0); $stuckCount = (int)($stuckCount ?? 0); $todayList = $todayList ?? collect(); $proEscalationsDue = (int)($proEscalationsDue ?? ($lateCount + $stuckCount)); $proConflictsCount = (int)($proConflictsCount ?? 0); $view = (string)($view ?? $q('view','table')); if(!in_array($view,['table','cards'],true)) $view = 'table'; // روابط (بـsafe_route عندك) $rCommand = safe_route('superadmin.proactive.command', [], true, url()->current()); $rCommandData= safe_route('superadmin.proactive.command.data', [], true, '#'); $rConflicts = safe_route('superadmin.proactive.conflicts', [], true, '#'); $rEscalations= safe_route('superadmin.proactive.escalations', [], true, '#'); $rProofs = safe_route('superadmin.proactive.proofs', [], true, '#'); $rDecisions = safe_route('superadmin.proactive.decisions', [], true, '#'); $rCompliance = safe_route('superadmin.proactive.compliance', [], true, '#'); $rTemplates = safe_route('superadmin.proactive.templates', [], true, '#'); $rRules = safe_route('superadmin.proactive.rules', [], true, '#'); // Badge style helper $chip = fn($cls) => "px-2.5 py-1 rounded-xl border text-[11px] font-extrabold $cls"; @endphp
لوحة مراقبة فورية: المواعيد • التعارضات • التصعيدات • الإثباتات. الهدف: ما في ولا فعالية تضيع أو تتأخر بدون قرار.
| الفعالية | نوع | الوقت | المدة | المنصة | القائد | الحالة |
|---|---|---|---|---|---|---|
|
{{ $e->event_title ?? '—' }}
{{ $e->event_description ?? '' }}
|
{{ $type==='plus' ? 'PLUS' : 'REG' }} | {{ $e->event_time ?? '—' }} | {{ (int)($e->duration_minutes ?? 0) }} د | {{ $e->platform ?? '—' }} | {{ $e->leader_name_safe ?? $e->leader_name ?? '—' }} | {{ strtoupper((string)$status) }} |