@extends('layouts.superadmin') @section('title', 'جدول برامج اللايفات') @section('content') @php use Carbon\Carbon; $user = auth()->user(); $labels = [ now()->subDay()->toDateString() => 'أمس', now()->toDateString() => 'اليوم', now()->addDay()->toDateString() => 'غداً', now()->addDays(2)->toDateString() => 'بعد غد', ]; @endphp
{{-- HERO / AERO --}}
{{-- طبقة زجاجية --}}
{{-- زخارف --}}

جدول برامج اللايفات

نظرة مجمّعة على كل اللايفات المجدولة حسب الأيام، مع تمييز السهرات 🔥.

الفترة الحالية: {{ $start->toDateString() }} → {{ $end->toDateString() }}
{{-- Filters --}}
رجوع
{{-- Days / Programs --}} @forelse($streams as $date => $items) @php // نتأكد إن التاريخ بدون وقت ونستعمله مع labels $dateKey = Carbon::parse($date)->toDateString(); $headerLabel = $labels[$dateKey] ?? $dateKey; @endphp
{{ $headerLabel }} ({{ $items->count() }} بث)
@foreach($items as $live) @php $u = $live->user; $name = $u->name ?: $u->username; $hours = round(($live->duration_hours ?? 0) + (($live->duration_minutes ?? 0)/60), 2); // وقت H:i مضبوط $timeText = $live->scheduled_time ? Carbon::parse($live->scheduled_time)->format('H:i') : '—'; $statusLabel = match($live->status) { 'confirmed' => 'مؤكد', 'missed_excuse' => 'مع عذر', 'missed_no_excuse' => 'بدون عذر', default => $live->status, }; $statusClass = match($live->status) { 'confirmed' => 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-200', 'missed_excuse' => 'bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-200', 'missed_no_excuse' => 'bg-rose-100 text-rose-800 dark:bg-rose-900/40 dark:text-rose-200', default => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-100', }; @endphp @endforeach
العضو الوقت الفترة النوع الحالة المدة
{{-- استخدام avatar_url عشان الصورة الافتراضية تطلع صح --}} {{ $name }}
{{ $name }} @if($live->is_sahra) 🔥 سهرة @endif
#{{ $u->id ?? '' }}
{{ $timeText }} {{ $live->slot_label ?: '—' }} @if($live->type === 'guests') قستات @elseif($live->type === 'tours') تحديات @elseif($live->type === 'both') قستات + تحديات @else {{ $live->type }} @endif {{ $statusLabel }} {{ $hours }} ساعة
@empty

لا توجد لايفات ضمن الفترة المحددة حالياً.

جرّب تغيير نطاق التواريخ أو العودة لصفحة التأكيد لرؤية لايفات اليوم.

@endforelse
@endsection