@extends('layouts.main_dashboard.app') @section('title', __('dashboard.Student Performance Trend')) @section('page_heading', __('dashboard.Student Performance Trend')) @php $isArabic = app()->getLocale() === 'ar'; @endphp @section('content')
{{-- Filter --}}
@if($student) {{-- Summary --}} @if($attendanceSummary)

{{ $trendData->count() }}

{{ $isArabic ? 'إجمالي الدرجات' : 'Total Marks' }}

{{ $trendData->isNotEmpty() ? number_format($trendData->avg('value'), 1) : '—' }}

{{ $isArabic ? 'متوسط الدرجات' : 'Avg. Mark' }}

{{ $attendanceSummary['pct'] !== null ? $attendanceSummary['pct'].'%' : '—' }}

{{ $isArabic ? 'نسبة الحضور' : 'Attendance' }}

{{ $quizTrend->count() }}

{{ $isArabic ? 'اختبارات مكتملة' : 'Quizzes Done' }}

@endif {{-- Marks Trend Chart --}} @if($trendData->isNotEmpty())

{{ $isArabic ? 'مسار الدرجات' : 'Marks Trend' }}

@endif {{-- Quiz Trend Chart --}} @if($quizTrend->isNotEmpty())

{{ $isArabic ? 'مسار الاختبارات' : 'Quiz Trend' }}

@endif {{-- Marks Table --}} @if($trendData->isNotEmpty())

{{ $isArabic ? 'تفاصيل الدرجات' : 'Marks Detail' }}

@foreach($trendData->sortByDesc('date') as $row) @endforeach
{{ $isArabic ? 'الاختبار' : 'Test' }} {{ $isArabic ? 'المادة' : 'Subject' }} {{ $isArabic ? 'التاريخ' : 'Date' }} {{ $isArabic ? 'الدرجة' : 'Mark' }}
{{ $row['label'] }} {{ $row['subject'] }} {{ $row['date'] }} {{ $row['value'] }}
@endif @else

{{ $isArabic ? 'اختر طالباً لعرض تقرير أدائه.' : 'Select a student to view their performance report.' }}

@endif
@endsection @if(isset($trendData) && $trendData->isNotEmpty()) @push('scripts') @endpush @endif