@extends('layouts.student') @section('title', 'My Profile') @section('content')
@if ($attendanceSummary && ($attendanceSummary->total_sessions ?? 0) > 0) @endif

Date of birth: {{ optional($student->date_of_birth)->format('d M Y') ?? '—' }}

Academic year: {{ $student->academicYear?->name ?? $class?->academicYear?->name ?? '—' }}

Current term: {{ $term?->name ?? '—' }}

Class teacher: {{ $class?->classTeacher?->full_name ?? '—' }}

@if ($student->email)

Email: {{ $student->email }}

@endif @if ($student->phone)

Phone: {{ $student->phone }}

@endif @if ($student->medical_notes)

Medical notes: {{ $student->medical_notes }}

@endif
@if ($student->guardians->isNotEmpty())

Parent / Guardian

@foreach ($student->guardians as $guardian)

{{ $guardian->full_name }} — {{ $guardian->pivot->relationship ?? 'Guardian' }} @if($guardian->pivot->is_primary)Primary@endif

@endforeach
@endif @if ($student->reportCards->isNotEmpty())

Academic History

@foreach ($student->reportCards as $card) @endforeach
TermClassAverage
{{ $card->term?->name }} {{ $card->schoolClass?->name }} {{ number_format((float) $card->overall_average, 1) }}% View
@endif @endsection