@extends('layouts.superadmin') @section('title', 'منظومة العلامات - النجوم الذهبية') @section('page-title', 'منظومة العلامات - النجوم الذهبية (Stars)') @section('content')
{{-- الهيدر --}}

النجوم الذهبية (Stars)

تصنيف الأعضاء إلى نجوم حسب صافي النقاط في الفترة المحددة من جدول score_records.

الفترة: من {{ $from }} إلى {{ $to }}.

{{-- تبديل عرض جدول / كروت --}}
@php $isCards = ($view ?? 'table') === 'cards'; @endphp جدول كروت
{{-- كروت ملخّص النجوم --}}
عدد الأعضاء في التحليل
{{ (int)($summary['count'] ?? 0) }}
Elite ★★★★ (≥ 200)
{{ (int)($summary['elite'] ?? 0) }}
Pro ★★★ (≥ 120)
{{ (int)($summary['pro'] ?? 0) }}
Solid ★★ (≥ 60)
{{ (int)($summary['solid'] ?? 0) }}
★ Basic / Zero (< 60)
{{ (int)($summary['basic'] ?? 0) + (int)($summary['zero'] ?? 0) }}
{{-- الفلاتر --}}
إعادة ضبط النجوم مبنية على صافي النقاط في الفترة فقط، وليس على total_points التاريخية.
@php $isCards = ($view ?? 'table') === 'cards'; @endphp {{-- وضع الكروت --}} @if($isCards)
@forelse($rows as $r) @php $net = (float)($r->net_points ?? 0); $pos = (float)($r->positive_points ?? 0); $neg = (float)($r->negative_points ?? 0); $stars = (int)($r->stars_count ?? 0); $tierV = (string)($r->stars_tier ?? 'zero'); $starColor = $tierV === 'elite' ? 'text-yellow-300' : ($tierV === 'pro' ? 'text-amber-300' : ($tierV === 'solid' ? 'text-emerald-300' : ($tierV === 'basic' ? 'text-sky-300' : 'text-slate-500'))); $starStr = str_repeat('★', $stars) . str_repeat('☆', max(0, 4-$stars)); @endphp
{{ $r->name ?? ('#'.$r->id) }}
{{ $r->username ?? '' }} • {{ $r->membership_status }} @if($r->gender === 'male') • شاب @elseif($r->gender === 'female') • صبية @endif
النجوم
{{ $starStr }}
صافي نقاط الفترة
{{ $net }}
إيجابي
{{ (int)$pos }}
سلبي
{{ (int)$neg }}
عدد السجلات
{{ (int)$r->records_count }}
@empty
لا يوجد أعضاء ضمن الفلاتر الحالية.
@endforelse
{{ $rows->links() }}
@else {{-- جدول --}}

جدول النجوم الذهبية

التصنيف: Elite (4 نجوم) • Pro (3) • Solid (2) • Basic (1) • Zero (0).

عدد الصفوف: {{ $rows->total() }}
@forelse($rows as $r) @php $stars = (int)($r->stars_count ?? 0); $tierV = (string)($r->stars_tier ?? 'zero'); $starStr = str_repeat('★', $stars) . str_repeat('☆', max(0,4-$stars)); $starColor = $tierV === 'elite' ? 'text-yellow-300' : ($tierV === 'pro' ? 'text-amber-300' : ($tierV === 'solid' ? 'text-emerald-300' : ($tierV === 'basic' ? 'text-sky-300' : 'text-slate-500'))); @endphp @empty @endforelse
العضو اليوزر الرتبة الجنس النجوم صافي النقاط إيجابي سلبي
{{ $r->name ?? ('#'.$r->id) }}
{{ $r->username ?? '—' }} {{ $r->membership_status }} @if($r->gender === 'male') شاب @elseif($r->gender === 'female') صبية @else غير محدد @endif {{ $starStr }} {{ (float)$r->net_points }} {{ (float)$r->positive_points }} {{ (float)$r->negative_points }}
لا يوجد أعضاء ضمن الفلاتر الحالية.
{{ $rows->links() }}
@endif
هذه الصفحة تعطيك نظرة سريعة: من النخبة (Elite)، من Pro، من ثابت (Solid)، من Basic، ومن تحت الصفر (Zero).
@endsection