@extends('layouts.superadmin') @section('title','ساعات الأعضاء — غرفة إيمان الملكاوي') @section('content') @php $cmpEnabled = (bool)($compare_enabled ?? false); $showGrowth = (bool)($show_growth ?? false); $showShare = (bool)($show_share ?? true); $showSahra = (bool)($show_sahra_col ?? false); $dirNow = strtolower((string)($dir ?? 'desc')) === 'asc' ? 'asc' : 'desc'; $toggleDir = $dirNow === 'asc' ? 'desc' : 'asc'; $sortNow = (string)($sort ?? 'total'); $rows = collect($rows ?? []); $totals = $totals ?? ['members'=>0,'live_hours'=>0,'guest_hours'=>0,'total_hours'=>0,'sahra_hours'=>0,'lives_count'=>0,'guest_count'=>0]; $teamGoals = $teamGoals ?? [ 'team_goal_live'=>0,'team_goal_guest'=>0,'team_goal_total'=>0, 'hit_live'=>null,'hit_guest'=>null,'hit_total'=>null, ]; $liveKpis = $liveKpis ?? ['total'=>0,'confirmed'=>0,'pending'=>0]; $guestKpis = $guestKpis ?? ['records'=>0,'hours'=>0]; $qBase = request()->except(['sort','dir']); $sortUrl = function($key) use ($qBase, $toggleDir) { return request()->fullUrlWithQuery(array_merge($qBase, ['sort'=>$key,'dir'=>$toggleDir])); }; $badgeHit = fn($hit) => $hit === null ? 'bg-white/5 border-white/10 text-white/70' : ($hit ? 'bg-emerald-500/15 border-emerald-400/25 text-emerald-200' : 'bg-rose-500/15 border-rose-400/25 text-rose-200'); $toneNum = fn($v) => $v >= 0 ? 'text-emerald-200' : 'text-rose-200'; @endphp
{{-- HERO --}}
ساعات الأعضاء — لايفات + قستات + مقارنات

ساعات الأعضاء

تجميع ساعات اللايفات المؤكدة + ساعات القستات — مع فلاتر ومقارنة.
الفترة: {{ $from }} → {{ $to }} @if($cmpEnabled) مقارنة: {{ $compare_from }} → {{ $compare_to }} @endif
{{-- FILTER --}}
فلترة
خيارات التحليل
{{-- compare custom --}}
{{-- Goals --}}
{{-- STATS --}}
عدد الأعضاء
{{ number_format($totals['members'] ?? 0) }}
ترتيب حسب: {{ $sortNow }}{{ $dirNow }}
إجمالي اللايف
{{ $totals['live_hours'] ?? 0 }}س
مؤكد: {{ $liveKpis['confirmed'] ?? 0 }} • إجمالي: {{ $liveKpis['total'] ?? 0 }} • معلّق: {{ $liveKpis['pending'] ?? 0 }}
إجمالي القست
{{ $totals['guest_hours'] ?? 0 }}س
سجلات: {{ $guestKpis['records'] ?? 0 }} • ساعات: {{ $guestKpis['hours'] ?? 0 }}
الإجمالي
{{ $totals['total_hours'] ?? 0 }}س
لايف تيم: {{ $teamGoals['team_goal_live'] ?? 0 }}س قست تيم: {{ $teamGoals['team_goal_guest'] ?? 0 }}س مجموع تيم: {{ $teamGoals['team_goal_total'] ?? 0 }}س
{{-- TABLE --}}
الترتيب والتفاصيل
@if($showSahra) @endif @if($showShare) @endif @if($cmpEnabled && $showGrowth) @endif @forelse($rows as $r) @php $name = $r['name'] ?? ('#'.$r['id']); $avatar = $r['avatar'] ?? null; $shareTotal = $r['share_total'] ?? null; $deltaTotal = $r['delta_total'] ?? null; $pctTotal = $r['pct_total'] ?? null; $hitLive = $r['hit_live'] ?? null; $hitGuest = $r['hit_guest'] ?? null; $hitTotal = $r['hit_total'] ?? null; @endphp @if($showSahra) @endif @if($showShare) @endif @if($cmpEnabled && $showGrowth) @endif @empty @endforelse
العضو لايف (س) قست (س)سهرة (س)مجموع (س) عدّادحصة مجموعΔ مجموع % مجموعالأهداف
@if($avatar) {{ $name }} @else @endif
{{ $name }}
{{ $r['username'] ?? '' }}
{{ number_format((float)($r['live_hours'] ?? 0), 2) }} {{ number_format((float)($r['guest_hours'] ?? 0), 2) }}{{ number_format((float)($r['sahra_hours'] ?? 0), 2) }}{{ number_format((float)($r['total_hours'] ?? 0), 2) }} لايف: {{ (int)($r['live_count'] ?? 0) }} قست: {{ (int)($r['guest_count'] ?? 0) }} {{ $shareTotal !== null ? number_format((float)$shareTotal, 1).'%' : '—' }} {{ $deltaTotal !== null ? ( ($deltaTotal>=0?'+':'').number_format((float)$deltaTotal,2) ) : '—' }} {{ $pctTotal !== null ? ( ($pctTotal>=0?'+':'').number_format((float)$pctTotal,1).'%' ) : '—' }}
لايف قست مجموع
لا يوجد بيانات ضمن الفلاتر الحالية.
{{-- WhatsApp Message --}}
تقرير جاهز للواتساب
WhatsApp Message
مؤشرات سريعة
Quick KPIs
ساعات سهرة {{ number_format((float)($totals['sahra_hours'] ?? 0), 2) }}س
عدّاد لايف {{ (int)($totals['lives_count'] ?? 0) }}
عدّاد قست {{ (int)($totals['guest_count'] ?? 0) }}
@endsection