@extends('layouts.app') @php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; $currency = \App\Models\Setting::currencyLabel($locale); $dayLabels = [ 'sunday' => $isRtl ? 'الأحد' : 'Sunday', 'monday' => $isRtl ? 'الاثنين' : 'Monday', 'tuesday' => $isRtl ? 'الثلاثاء' : 'Tuesday', 'wednesday' => $isRtl ? 'الأربعاء' : 'Wednesday', 'thursday' => $isRtl ? 'الخميس' : 'Thursday', 'friday' => $isRtl ? 'الجمعة' : 'Friday', 'saturday' => $isRtl ? 'السبت' : 'Saturday', ]; @endphp @section('title', ($isRtl ? 'تفاصيل الحصة' : 'Class Details') . ' - ' . ($isRtl && $gymClass->name_ar ? $gymClass->name_ar : $gymClass->name)) @section('content')

{{ $isRtl ? 'تفاصيل الحصة' : 'Class Details' }}

{{ $isRtl && $gymClass->name_ar ? $gymClass->name_ar : $gymClass->name }}

{{ $gymClass->is_active ? ($isRtl ? 'نشطة' : 'Active') : ($isRtl ? 'غير نشطة' : 'Inactive') }} {{ $isRtl ? 'مدرب:' : 'Trainer:' }} {{ $gymClass->trainer?->full_name ?? ($isRtl ? 'بدون' : 'None') }}
@if($gymClass->description)

{{ $gymClass->description }}

@endif

{{ $isRtl ? 'السعر' : 'Price' }}

{{ number_format((float)$gymClass->price, 2) }} {{ $currency }}

{{ $isRtl ? 'المدة' : 'Duration' }}

{{ $gymClass->duration_minutes }} {{ $isRtl ? 'دقيقة' : 'min' }}

{{ $isRtl ? 'السعة' : 'Capacity' }}

{{ $gymClass->capacity }} {{ $isRtl ? 'عضو' : 'members' }}

{{ $isRtl ? 'إضافة موعد' : 'Add Schedule' }}

@csrf

{{ $isRtl ? 'المواعيد' : 'Schedules' }}

{{ $isRtl ? 'مواعيد الحصة خلال الأسبوع' : 'Weekly schedule' }}

{{ $gymClass->schedules->count() }} {{ $isRtl ? 'موعد' : 'schedules' }}
@forelse($gymClass->schedules as $schedule) @empty @endforelse
{{ $isRtl ? 'اليوم' : 'Day' }} {{ $isRtl ? 'الوقت' : 'Time' }} {{ $isRtl ? 'القاعة' : 'Room' }} {{ $isRtl ? 'المدرب' : 'Trainer' }} {{ $isRtl ? 'إجراءات' : 'Actions' }}
{{ $dayLabels[$schedule->day_of_week] ?? $schedule->day_of_week }} {{ $schedule->start_time ? \Carbon\Carbon::parse($schedule->start_time)->format('H:i') : '—' }} - {{ $schedule->end_time ? \Carbon\Carbon::parse($schedule->end_time)->format('H:i') : '—' }} {{ $schedule->room ?? '—' }} {{ $schedule->trainer?->full_name ?? ($gymClass->trainer?->full_name ?? '—') }}
@csrf @method('DELETE')
{{ $isRtl ? 'لا توجد مواعيد' : 'No schedules yet' }}
@endsection