@extends('layouts.main_dashboard.app') @section('title', __('dashboard.All Students')) @section('page_heading', __('dashboard.All Students')) @section('page_subtitle', app()->getLocale() === 'ar' ? 'إدارة بيانات الطلاب والبحث والوصول السريع إلى ملفاتهم من واجهة متسقة.' : 'Manage student records, search, and quick profile access from a consistent interface.') @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; $filtersOpen = request()->hasAny(['keyword', 'school_class_id', 'gender', 'first_name', 'middle_name', 'last_name', 'registration_number', 'national_id', 'nationality', 'email', 'phone']); @endphp @section('content')

{{ __('dashboard.All Students') }}

{{ $isArabic ? 'راجع بيانات الطلاب، طبّق الفلاتر، وانتقل مباشرة إلى الملف الشخصي أو التعديل.' : 'Review student records, apply filters, and jump directly to profile or editing.' }}

{{ $isArabic ? 'دليل الطلاب' : 'Students directory' }}

{{ __('dashboard.Student Directory') }}

{{ __('dashboard.Search and filter student records quickly.') }}

{{ __('dashboard.Total Students') }}

{{ $students->total() }}

{{ __('dashboard.Classes') }}

{{ $schoolClasses->count() }}

{{ __('dashboard.Current Page') }}

{{ $students->currentPage() }}

{{ $isArabic ? 'داخل الصفحة' : 'Visible now' }}

{{ $students->count() }}

{{ $isArabic ? 'تصفية الطلاب' : 'Filter students' }}

{{ $isArabic ? 'افتح الفلاتر عند الحاجة للوصول السريع إلى الطالب المطلوب.' : 'Open filters when needed to narrow down the student list quickly.' }}

{{ __('dashboard.Reset') }}
@if($students->isEmpty())

{{ __('dashboard.No data found') }}

{{ $isArabic ? 'لا يوجد طلاب مطابقون للفلاتر الحالية.' : 'No students match the current filters.' }}

@else {{-- Loading skeleton --}}
@for($i = 0; $i < 6; $i++) @endfor
{{ __('dashboard.Student') }} {{ __('dashboard.Contact') }} {{ __('dashboard.School Class') }} {{ __('dashboard.ID') }} {{ __('dashboard.Actions') }}
{{-- Bulk Action Bar --}}
{{ $isArabic ? 'محدد' : 'selected' }}
@csrf
@foreach($students as $student) @php($studentClass = $student->schoolClass->first()) @endforeach
{{ __('dashboard.Student') }} {{ __('dashboard.Contact') }} {{ __('dashboard.School Class') }} {{ __('dashboard.ID') }} {{ __('dashboard.Actions') }}
@if($student->avatar) {{ $student->name }} @else @endif

{{ $student->name }}

{{ $student->registration_number ?: __('dashboard.No registration number') }}

{{ $student->email }}

{{ $student->phone ?: __('dashboard.Not Available') }}

{{ $studentClass ? $studentClass->grade->stage->name . ' / ' . $studentClass->grade->name . ' / ' . $studentClass->name : __('dashboard.No Class Assigned') }} #{{ $student->id }}
{{ __('dashboard.View') }} {{ __('dashboard.Edit') }}
@csrf @method('DELETE')
{{ $students->appends(request()->query())->links('pagination::simple-tailwind') }}
@endif
@endsection