@extends('layouts.main_dashboard.app') @section('title', __('dashboard.All Teachers')) @section('page_heading', __('dashboard.All Teachers')) @section('page_subtitle', app()->getLocale() === 'ar' ? 'إدارة المعلمين وحساباتهم والمساقات المرتبطة بهم من واجهة موحدة.' : 'Manage teachers, their accounts, and linked courses from one unified interface.') @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; $visibleTeachers = $teachers->count(); $teachersWithCourses = $teachers->filter(fn ($teacher) => ($teacher->courses_count ?? 0) > 0)->count(); $teachersWithoutCourses = $visibleTeachers - $teachersWithCourses; @endphp @section('content')

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

{{ $isArabic ? 'عرض منظم للمعلمين مع البحث السريع وإدارة المساقات من نفس الشاشة.' : 'A structured teacher directory with quick search and direct course management.' }}

{{ $isArabic ? 'دليل المعلمين' : 'Teachers directory' }}

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

{{ $isArabic ? 'ابحث عن أي معلم أو انتقل مباشرة لإدارة مساقاته.' : 'Search for any teacher or jump directly to their courses management.' }}

{{ $isArabic ? 'إجمالي المعلمين' : 'Total teachers' }}

{{ $teachers->total() }}

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

{{ $visibleTeachers }}

{{ $isArabic ? 'بمساقات' : 'With courses' }}

{{ $teachersWithCourses }}

{{ $isArabic ? 'بدون مساقات' : 'Without courses' }}

{{ $teachersWithoutCourses }}

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

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

@else
@foreach($teachers as $teacher) @endforeach
{{ $isArabic ? 'المعلم' : 'Teacher' }} {{ __('dashboard.Contact') }} {{ $isArabic ? 'المساقات' : 'Courses' }} {{ __('dashboard.Actions') }}
@if($teacher->avatar) {{ $teacher->name }} @else @endif

{{ $teacher->first_name . ' ' . $teacher->last_name }}

#{{ $teacher->id }}

{{ $teacher->email }}

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

{{ $teacher->courses_count }} {{ __('dashboard.Courses Count') }}
{{ $teachers->appends(request()->query())->links('pagination::simple-tailwind') }}
@endif
@endsection