@extends('layouts.app') @php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; @endphp @section('title', $isRtl ? 'حجوزات الحصص' : 'Class Bookings') @section('content')

{{ $isRtl ? 'حجوزات الحصص' : 'Class Bookings' }}

{{ $isRtl ? 'إدارة الحجوزات والحضور' : 'Manage bookings and attendance' }}

{{ $isRtl ? 'إعادة ضبط' : 'Reset' }}
@forelse($bookings as $booking) @php $statusColors = [ 'booked' => 'bg-blue-100 text-blue-700', 'attended' => 'bg-emerald-100 text-emerald-700', 'cancelled' => 'bg-rose-100 text-rose-700', ]; $statusLabels = [ 'booked' => $isRtl ? 'محجوز' : 'Booked', 'attended' => $isRtl ? 'حضر' : 'Attended', 'cancelled' => $isRtl ? 'ملغي' : 'Cancelled', ]; @endphp @empty @endforelse
{{ $isRtl ? 'التاريخ' : 'Date' }} {{ $isRtl ? 'الحصة' : 'Class' }} {{ $isRtl ? 'العضو' : 'Member' }} {{ $isRtl ? 'الحالة' : 'Status' }} {{ $isRtl ? 'إجراءات' : 'Actions' }}
{{ $booking->booking_date?->format('Y-m-d') ?? '—' }}

{{ $isRtl && ($booking->classSchedule->gymClass->name_ar ?? null) ? $booking->classSchedule->gymClass->name_ar : ($booking->classSchedule->gymClass->name ?? '—') }}

{{ $booking->classSchedule->start_time ? \Carbon\Carbon::parse($booking->classSchedule->start_time)->format('H:i') : '—' }} - {{ $booking->classSchedule->end_time ? \Carbon\Carbon::parse($booking->classSchedule->end_time)->format('H:i') : '—' }}

{{ $booking->member->full_name ?? '—' }}

{{ $booking->member->member_id ?? '' }}

{{ $statusLabels[$booking->status] ?? $booking->status }}
@if($booking->status === 'booked')
@csrf
@csrf
@else @endif
{{ $isRtl ? 'لا توجد حجوزات' : 'No bookings found' }}
@if($bookings->hasPages())
{{ $bookings->withQueryString()->links() }}
@endif
@endsection