{{ __('بوابة ولي الأمر') }} 👨‍👩‍👧‍👦

مرحباً بك، {{ $parent->full_name ?? Auth::user()->name }}

تابع التحصيل الدراسي لأبنائك وتواصل مع المدرسة بسهولة.

{{ $children->count() }} عدد الأبناء
@if($children->isEmpty())

لا يوجد أبناء مسجلين

لم يتم ربط أي طالب بحسابك حتى الآن. يرجى التواصل مع إدارة المدرسة.

@else

الأبناء المسجلين

@foreach($children as $child)
{{ substr($child->full_name, 0, 1) }}

{{ $child->full_name }}

{{ $child->grade->name ?? 'غير محدد' }}
آخر الدرجات المرصودة
@if($child->marks->count() > 0) @foreach($child->marks->sortByDesc('created_at')->take(3) as $mark)
{{ $mark->subject->name ?? 'مادة' }} {{ $mark->exam->title ?? $mark->type }}
{{ $mark->score }} / {{ $mark->exam->max_score ?? 100 }}
@endforeach @else

لا توجد درجات حديثة.

@endif
@php $totalDays = $child->attendances->count(); $presentDays = $child->attendances->where('status', 'presents')->count(); $attendancePercentage = $totalDays > 0 ? round(($presentDays / $totalDays) * 100) : 0; $lastAbsence = $child->attendances->where('status', 'absent')->sortByDesc('date')->first(); @endphp
ملخص الحضور التراكمي
{{ $attendancePercentage }}%

{{ $presentDays }} أيام حضور من إجمالي {{ $totalDays }}

آخر غياب: {{ $lastAbsence ? \Carbon\Carbon::parse($lastAbsence->date)->format('Y-m-d') : 'لا يوجد' }}

آخر تنبيهات المعلمين
@php $lastNote = $child->notes->first(); @endphp @if($lastNote)
{{ $lastNote->title }}

{{ $lastNote->content }}

@else

لا توجد ملاحظات جديدة.

@endif
@endforeach
@endif