@extends('layouts.superadmin') @section('content') @php // ✅ Human data coming from meta.human (اللي ضفناه بالـ SignalService) $toneBadge = function($tone){ return match($tone){ 'danger' => 'bg-rose-500/15 text-rose-200 ring-rose-400/30', 'warn' => 'bg-amber-500/15 text-amber-200 ring-amber-400/30', 'mid' => 'bg-violet-500/15 text-violet-200 ring-violet-400/30', 'low' => 'bg-emerald-500/15 text-emerald-200 ring-emerald-400/30', 'info' => 'bg-sky-500/15 text-sky-200 ring-sky-400/30', default => 'bg-white/10 text-white/80 ring-white/20', }; }; $statusBadge = function($st){ return match($st){ 'new' => 'bg-cyan-500/15 text-cyan-200 ring-cyan-400/30', 'seen' => 'bg-slate-500/15 text-slate-200 ring-slate-400/25', 'handled' => 'bg-emerald-500/15 text-emerald-200 ring-emerald-400/30', default => 'bg-white/10 text-white/70 ring-white/20', }; }; @endphp
{{-- HERO (ستايل سقراط) --}}

ProSanta Signals — بلغة بشرية

كل إشارة = (شو يعني؟) + (شو أعمل؟) — بدون route_name ولا مصطلحات مخيفة.

{{-- Filters (ستايل سقراط) --}}
{{-- Cards list (بدل جدول) — أوضح للمشرف --}}
@forelse($signals as $s) @php $human = ($s->meta['human'] ?? null); $tone = $human['tone'] ?? null; $tagCls = $toneBadge($tone); $stCls = $statusBadge($s->status ?? ''); @endphp
{{-- العنوان البشري --}}
{{ ($human['emoji'] ?? '🔔') }} {{ $human['type'] ?? $s->title }}
{{-- الهدف البشري --}}
الهدف: {{ $human['subject'] ?? ($s->subject_type.':'.$s->subject_key) }}
{{-- شو يعني؟ --}}
شو يعني؟ {{ $human['meaning'] ?? ($s->summary ?? '—') }}
{{-- شو أعمل؟ --}}
شو أعمل؟ {{ $human['action'] ?? '—' }}
{{-- Chips --}}
{{ $human['tag'] ?? strtoupper($s->severity) }} {{ $human['confidence_label'] ?? 'ثقة' }} • {{ $s->confidence }}% {{ strtoupper($s->status) }} Score: {{ $s->risk_score }} @if(!empty(($s->meta ?? [])['case_id'])) Case #{{ ($s->meta ?? [])['case_id'] }} @endif @if(!empty(($s->meta ?? [])['repeat_7d'])) تكرار 7 أيام: {{ ($s->meta ?? [])['repeat_7d'] }} @endif
{{-- Triggers (مختصر + واضح) --}} @if(!empty($s->triggers))
@foreach($s->triggers as $t) {{ $t['key'] ?? 'x' }}: {{ $t['value'] ?? '—' }} @endforeach
@endif
{{-- Actions --}}
@csrf
@csrf
@empty
لا توجد بيانات.
@endforelse
{{ $signals->links() }}
@endsection