@extends('layouts.main_dashboard.app') @section('title', app()->getLocale() === 'ar' ? 'ملف الطالب الموحد' : 'Unified Student Profile') @section('skip_page_hero', true) @php($isArabic = app()->getLocale() === 'ar') @section('content')

{{ $isArabic ? 'الملف الموحد' : 'Unified profile' }}

{{ $student->name }}

{{ $studentClass?->grade?->stage?->name }}{{ $studentClass?->grade?->name ? ' • ' . $studentClass->grade->name : '' }}{{ $studentClass?->name ? ' • ' . $studentClass->name : '' }}

{{ $isArabic ? 'إنذارات نشطة' : 'Active alerts' }}

{{ $summary['active_alerts'] }}

{{ $isArabic ? 'غياب 30 يوم' : '30-day absences' }}

{{ $summary['attendance_30_days'] }}

{{ $isArabic ? 'متوسط الدرجات' : 'Average mark' }}

{{ $summary['average_mark'] ?: '—' }}

{{ $isArabic ? 'أداء المواد' : 'Subject performance' }}

@if($coursePerformance->count() > 0) @foreach($coursePerformance as $row) @endforeach @else @endif
{{ $isArabic ? 'المادة' : 'Subject' }} {{ $isArabic ? 'المتوسط' : 'Average' }} {{ $isArabic ? 'عدد القياسات' : 'Items' }}
{{ $row->subject_name }} {{ round($row->average_mark, 1) }} {{ $row->items_count }}
{{ $isArabic ? 'لا توجد درجات كافية بعد.' : 'No sufficient marks yet.' }}

{{ $isArabic ? 'الملاحظات والوقائع السلوكية' : 'Behavior notes and incidents' }}

@if($behaviorIncidents->count() > 0) @foreach($behaviorIncidents as $incident)

{{ $incident->summary }}

{{ $incident->occurred_on?->format('Y-m-d') }} • {{ $incident->category }}

{{ $incident->severity }}
@if($incident->details)

{{ $incident->details }}

@endif
@endforeach @else
{{ $isArabic ? 'لا توجد وقائع سلوكية مسجلة.' : 'No behavior incidents recorded.' }}
@endif

{{ $isArabic ? 'الحضور والدرجات الأخيرة' : 'Recent attendance and marks' }}

@if($attendanceRows->count() > 0) @foreach($attendanceRows as $row)

{{ $row->attendance?->course?->subject?->name ?? '—' }}

{{ $row->attendance?->date?->format('Y-m-d') ?? '—' }}

@endforeach @else
{{ $isArabic ? 'لا توجد سجلات غياب حديثة.' : 'No recent absence records.' }}
@endif
@if($markRows->count() > 0) @foreach($markRows as $row)

{{ $row->subject_name }}

{{ $row->mark }}

{{ $row->title }} • {{ $row->date }}

@endforeach @else
{{ $isArabic ? 'لا توجد درجات حديثة.' : 'No recent marks.' }}
@endif

{{ $isArabic ? 'الخطط والجلسات' : 'Plans and sessions' }}

@if($behaviorPlans->count() > 0) @foreach($behaviorPlans as $plan)

{{ $plan->title }}

{{ $plan->status }}

{{ $plan->goal }}

@endforeach @endif @if($sessions->count() > 0) @foreach($sessions as $session)

{{ $session->session_type }}

{{ $session->starts_at?->translatedFormat('Y/m/d h:i A') ?? '—' }}

@endforeach @endif

{{ $isArabic ? 'الاستفسارات والإحالات' : 'Inquiries and referrals' }}

@if($referrals->count() > 0) @foreach($referrals as $referral)

{{ $referral->title }}

{{ $referral->status }} • {{ $referral->referrer?->name ?? '—' }}

@endforeach @endif @if($inquiries->count() > 0) @foreach($inquiries as $inquiry)

{{ $inquiry->title }}

{{ $inquiry->teacher?->name ?? '—' }} • {{ $inquiry->course?->subject?->name ?? '—' }}

@endforeach @endif

{{ $isArabic ? 'أولياء الأمور والتنبيهات' : 'Parents and alerts' }}

@foreach($student->parents as $parent)

{{ $parent->name }}

{{ $parent->email }}

@endforeach @if($alerts->count() > 0) @foreach($alerts as $alert)

{{ $alert->title }}

{{ $alert->summary }}

@endforeach @endif
@endsection