@extends('layout.layout') @php $title = 'Dashboard'; $subTitle = 'Overview'; // Define the dynamic data arrays here (essential for the charts to work) $referralData = [6, 3, 1]; // Submitted, Accepted, Rejected $requestData = [10, 5, 3]; // Submitted, Completed, In-Progress $script = ' '; @endphp @section('content')
Sessions

2
Absent Sessions
16
Complete Sessions
Referrals

{{-- Chart container, ID matches JS --}}
Submitted ({{ $referralData[0] }}) Accepted ({{ $referralData[1] }}) Rejected ({{ $referralData[2] }})
Announcements

Upcoming Holidays

ثورة 30 يونيو
4 - Jul Thursday
راس السنة الهجرية
11 - Jul Thursday
Requests
Unassigned 2

{{-- Chart container, ID matches JS --}}
Submitted ({{ $requestData[0] }}) Completed ({{ $requestData[1] }}) In-Progress ({{ $requestData[2] }})
Upcoming Sessions

@forelse ($sessions as $session)
{{$session['session_name']}}
{{$session['session_date']}}
@if (!$loop->last)
@endif @empty

No recent quiz submissions found.

@endforelse
Quizzes

@forelse ($quizzes as $quiz)
{{-- Display the quiz title. Replace '#' with the actual link URL if available. --}} {{ $quiz->title }} {{-- Display the percentage score --}}
{{ $quiz->percentage }}%
@if (!$loop->last)
@endif @empty

No recent quiz submissions found.

@endforelse
Assignments

@forelse ($assignments as $assignment)
{{$assignment->title}}
{{$assignment->grade}}
@if (!$loop->last)
@endif @empty

No recent quiz submissions found.

@endforelse
Exams

@forelse ($exams as $exam)
{{$exam->title}}
@if($exam->passed == 1) Passed @else Failed @endif
@if (!$loop->last)
@endif @empty

No recent Exams submissions found.

@endforelse
Activities

@php $labels = [ 'gift-call' => ['label' => 'Gift Call', 'class' => 'bg-info'], 'extra-session' => ['label' => 'Extra Sessions', 'class' => 'bg-warning'], 'english-club' => ['label' => 'English Club', 'class' => 'bg-success'], ]; @endphp @foreach ($labels as $key => $meta)
{{ $sessionCounts[$key] ?? 0 }}
{{ $meta['label'] }}
@endforeach
Level & Payment Status

@php $courseStudent = $latestSchedule?->courseStudent?->first(); $invoice = $courseStudent?->finanaceStudentInvoice; $paymentStatus = $invoice?->payment_status ?? 'pending'; @endphp @if ($paymentStatus === 'not_paid') Not Paid @elseif ($invoice) Paid @else No Invoice @endif
@if ($invoice && $latestSchedule) {{ $latestSchedule?->track?->name_en ?? 'N/A' }} - {{ $latestSchedule?->trackLevel?->name_en ?? 'N/A' }} @else {{ $latestSchedule?->track?->name_en ?? 'N/A' }} - {{ $latestSchedule?->trackLevel?->name_en ?? 'N/A' }} @endif
Teachers History
{{ $teachers->count() }}

@forelse ($teachers as $teacher)
{{ $loop->iteration }}
{{ $teacher['name'] }}
@empty

No teachers found for this student.

@endforelse
@endsection