@extends('layouts.main_dashboard.app') @section('title', __('dashboard.All Grades')) @section('page_heading', __('dashboard.All Grades')) @section('skip_page_hero', true) @php $isArabic = app()->getLocale() === 'ar'; $gradesCount = method_exists($grades, 'total') ? $grades->total() : $grades->count(); $visibleGrades = $grades->count(); $stagesCount = $grades->getCollection()->pluck('stage_id')->filter()->unique()->count(); @endphp @section('content')

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

{{ $isArabic ? 'إدارة الدرجات الدراسية وربطها بالمراحل والفصول والسنوات الأكاديمية من واجهة أبسط وأكثر اتساقاً.' : 'Manage grades and their links to stages, terms, and years from a simpler, more consistent interface.' }}

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

{{ $gradesCount }}

{{ __('dashboard.Add New Grade') }}

{{ __('dashboard.Grades List') }}

{{ __('dashboard.Review grade hierarchy and manage records quickly.') }}

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

{{ $gradesCount }}

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

{{ $stagesCount }}

{{ $isArabic ? 'المعروض' : 'Visible' }}

{{ $visibleGrades }}

@if($grades->isEmpty())

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

{{ $isArabic ? 'لا توجد درجات دراسية مضافة حتى الآن.' : 'No grades have been added yet.' }}

@else
@foreach($grades as $grade) @endforeach
{{ __('dashboard.Grade') }} {{ __('dashboard.Stage') }} {{ __('dashboard.Term') }} {{ __('dashboard.Year') }} {{ __('dashboard.Actions') }}

{{ $grade->name }}

#{{ $grade->id }}

{{ $grade->stage?->name ?? __('dashboard.Not Available') }} {{ $grade->stage?->term?->name ?? __('dashboard.Not Available') }} {{ $grade->stage?->term?->year?->name ?? __('dashboard.Not Available') }}
{{ __('dashboard.View') }} {{ __('dashboard.Edit') }}
@csrf @method('DELETE')
@if(method_exists($grades, 'links'))
{{ $grades->links() }}
@endif @endif
@endsection