@extends('layouts.main_dashboard.app') @php $isArabic = app()->getLocale() === 'ar'; @endphp @section('title', $isArabic ? 'جدول المدرس' : 'Teacher Schedule') @section('page_heading', $isArabic ? 'جدول المدرس' : 'Teacher Schedule') @section('page_subtitle', $isArabic ? 'عرض أسبوعي لحصصك يبدأ تلقائيًا بيوم اليوم مع إبراز واضح له.' : 'A weekly view of your classes that opens on today automatically and highlights it clearly.') @section('skip_page_hero', true) @section('content')

{{ $isArabic ? 'الجدول الأسبوعي' : 'Weekly schedule' }}

{{ $isArabic ? 'يبدأ بيومك الحالي' : 'Starts with your current day' }}

{{ $isArabic ? 'تم ترتيب الأيام بحيث يظهر يوم اليوم أولًا وبحالة مميزة، ثم يمكنك التنقل إلى بقية أيام الأسبوع من نفس الشاشة.' : 'Days are ordered so today appears first with a highlighted state, then you can move through the rest of the week from the same screen.' }}

{{ $isArabic ? 'حصص اليوم' : 'Today sessions' }}

{{ $todayEntries->count() }}

{{ $isArabic ? 'المقررات الموجودة' : 'Active courses' }}

{{ $courseCount }}

{{ $isArabic ? 'الفصول المخدومة' : 'Covered classes' }}

{{ $classCount }}

@foreach($orderedDays as $day) @php($isTodayTab = $day === $today) @endforeach
@foreach($orderedDays as $day) @php($entries = $groupedSchedule[$day] ?? collect())

{{ __('dashboard.' . $day) }}

@if($day === $today) {{ $isArabic ? 'اليوم الحالي' : 'Current day' }} @endif

{{ $day === $today ? ($isArabic ? 'هذا هو الجدول المفتوح تلقائيًا عند الدخول للصفحة.' : 'This schedule opens automatically when you enter the page.') : ($isArabic ? 'تفاصيل الحصص المجدولة لهذا اليوم.' : 'Scheduled sessions for this day.') }}

{{ $isArabic ? 'عدد الحصص:' : 'Sessions:' }} {{ $entries->count() }}

@if($entries->isEmpty())
{{ $isArabic ? 'لا توجد حصص مجدولة لهذا اليوم.' : 'No classes scheduled for this day.' }}
@else
@foreach($entries as $entry) @endforeach
{{ $isArabic ? 'الحصة' : 'Period' }} {{ $isArabic ? 'المساق' : 'Course' }} {{ $isArabic ? 'الصف' : 'Class' }} {{ $isArabic ? 'الوقت' : 'Time' }} {{ $isArabic ? 'الدرس' : 'Lesson' }}
{{ $entry->period }}

{{ $entry->course?->name ?? '—' }}

{{ $entry->course?->subject?->name ?? '—' }}

{{ $entry->course?->schoolClass?->name ?? '—' }} {{ $entry->start_time }} - {{ $entry->end_time }} {{ $entry->lesson?->title ?? ($isArabic ? 'بدون درس محدد' : 'No linked lesson') }}
@endif
@endforeach
@endsection