صفحة شخصية حسب حسابك
هنا بتشوف حالة لايفاتك (مؤكد/معلق/غياب...) + ساعاتك المؤكدة. (الإثبات: قريبًا)
{{-- KPIs --}}
@php
$pill = fn($label,$val,$cls) => "
";
@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 --}}
@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 }}
التاريخ:
•
الوقت:
•
المدة:
•
النقاط:
@if(!empty($live->slot_label))
السلوت: {{ $live->slot_label }}
@endif
{{-- Excuse --}}
@if($hasExcuse)
{!! nl2br(e($excuse)) !!}
@endif
{{-- Proof (قريبًا) --}}
قريبًا
سيتم تفعيل عرض صورة الإثبات هنا لاحقاً…
@endforeach