@extends('layouts.superadmin') @section('title','تصنيف الأعضاء الذكي - ProMission') @section('page-title','تصنيف الأعضاء الذكي (AI Roles) - ProMission') @section('content') @php $from = $from ?? request('from'); $to = $to ?? request('to'); $rows = collect($rows ?? []); $isCards = (request('view','cards') === 'cards'); $roleBadge = function($role){ $role = (string)$role; return match(true) { str_contains($role,'🔥') => 'bg-emerald-500/15 text-emerald-200 border-emerald-500/25', str_contains($role,'🧱') => 'bg-sky-500/15 text-sky-200 border-sky-500/25', str_contains($role,'🚀') => 'bg-purple-500/15 text-purple-200 border-purple-500/25', str_contains($role,'⚠️') => 'bg-amber-500/15 text-amber-200 border-amber-500/25', default => 'bg-slate-500/15 text-slate-200 border-slate-500/25', }; }; $roleText = function($role){ $role = (string)$role; return match(true) { str_contains($role,'🔥') => 'محرّك (يقود التيم)', str_contains($role,'🧱') => 'ثابت (مستقر ومفيد)', str_contains($role,'🚀') => 'صاعد (تحسّن واضح)', str_contains($role,'⚠️') => 'متذبذب (يحتاج تثبيت)', default => 'خامد (يحتاج دفعة)', }; }; // Stats by role $counts = $rows->countBy('role')->all(); $total = $rows->count(); $avgMix = round((float)($rows->avg('mix_hours') ?? 0), 2); $avgSahra = round((float)($rows->avg('sahra_hours') ?? 0), 2); $maxStreak= (int)($rows->max('streak_days') ?? 0); // Top by total contribution $top = $rows->sortByDesc(fn($r)=> (float)$r['mix_hours'] + (float)$r['sahra_hours'])->take(8)->values(); @endphp
Mix + Sahra + Streak → Role
| العضو | Mix (س) | Sahra (س) | Streak | Role | وصف |
|---|---|---|---|---|---|
|
{{ $r['name'] }}
{{ $r['username'] ? '@'.$r['username'] : '' }}
|
{{ $r['mix_hours'] }} | {{ $r['sahra_hours'] }} | {{ $r['streak_days'] }} | {{ $role }} | {{ $roleText($role) }} |
| لا يوجد بيانات. | |||||