@php $user = auth()->user(); if ($user->hasRole('super-admin')) { $layout = 'layouts.superadmin'; } elseif ($user->hasRole('advisor')) { $layout = 'layouts.advisor'; } elseif ($user->hasRole('moderator')) { $layout = 'layouts.moderator'; } else { $layout = 'layouts.member'; } $status = $status ?? request('status',''); $from = $from ?? request('from',''); $to = $to ?? request('to',''); $qText = $qText ?? request('q',''); @endphp @extends($layout) @section('title','لايفاتي') @section('content')
{{-- HERO --}}
صفحة شخصية حسب حسابك

لايفاتي

هنا بتشوف حالة لايفاتك (مؤكد/معلق/غياب...) + ساعاتك المؤكدة. (الإثبات: قريبًا)

ضمن الفلاتر
{{ number_format((int)($kpis['total'] ?? 0)) }}
{{-- KPIs --}}
@php $pill = fn($label,$val,$cls) => "
{$label}
{$val}
"; @endphp {!! $pill('غير مؤكد', (int)($kpis['scheduled'] ?? 0), 'text-sky-200') !!} {!! $pill('معلّق', (int)($kpis['pending'] ?? 0), 'text-amber-200') !!} {!! $pill('مؤكد', (int)($kpis['confirmed'] ?? 0), 'text-emerald-200') !!} {!! $pill('غياب بعذر', (int)($kpis['missed_excuse'] ?? 0), 'text-yellow-200') !!} {!! $pill('غياب بدون', (int)($kpis['missed_noexcuse'] ?? 0), 'text-rose-200') !!} {!! $pill('ساعات مؤكدة', number_format((float)($kpis['confirmed_hours'] ?? 0), 2), 'text-cyan-200') !!} {!! $pill('نقاط', (int)($kpis['points_sum'] ?? 0), 'text-fuchsia-200') !!} {!! $pill('إجمالي', (int)($kpis['total'] ?? 0), 'text-white') !!}
{{-- Filters --}}
{{-- LIST --}} @if($lives->count())
@foreach($lives as $live) @php $statusKey = (string)($live->status ?? ''); $statusTxt = $live->status_text ?? 'غير محدد'; $badgeCls = match($statusKey) { 'confirmed' => 'bg-emerald-500/15 border-emerald-400/25 text-emerald-200', 'pending_proof','pending_excuse' => 'bg-amber-500/15 border-amber-400/25 text-amber-200', 'scheduled' => 'bg-sky-500/15 border-sky-400/25 text-sky-200', 'missed_excuse' => 'bg-yellow-500/15 border-yellow-400/25 text-yellow-200', 'missed_no_excuse','proof_rejected','excuse_rejected' => 'bg-rose-500/15 border-rose-400/25 text-rose-200', default => 'bg-white/10 border-white/15 text-white/75', }; $icon = match($statusKey) { 'confirmed' => 'fa-circle-check', 'pending_proof','pending_excuse' => 'fa-hourglass-half', 'scheduled' => 'fa-calendar', 'missed_excuse' => 'fa-triangle-exclamation', 'missed_no_excuse','proof_rejected','excuse_rejected' => 'fa-circle-xmark', default => 'fa-circle-info', }; $date = $live->scheduled_date_ymd ?? optional($live->scheduled_date)->format('Y-m-d'); $time = $live->scheduled_time_hm ?? '—'; $dur = $live->formatted_duration ?? 'غير محدد'; $pts = (int)($live->points_earned ?? 0); $excuse = trim((string)($live->excuse_reason ?? '')); $hasExcuse = $excuse !== ''; @endphp
{{ $statusTxt }}
التاريخ: {{ $date }} الوقت: {{ $time }} المدة: {{ $dur }} النقاط: {{ $pts>0?'+':'' }}{{ $pts }}
@if(!empty($live->slot_label))
السلوت: {{ $live->slot_label }}
@endif
رقم
#{{ $live->id }}
{{-- Excuse --}} @if($hasExcuse)
العذر
{!! nl2br(e($excuse)) !!}
@endif {{-- Proof (قريبًا) --}}
إثبات اللايف
قريبًا
سيتم تفعيل عرض صورة الإثبات هنا لاحقاً…
@endforeach
{{ $lives->links() }}
@else
لا يوجد لايفات ضمن هذه الفلاتر.
@endif
@endsection