@extends('layouts.app') @php($canManage = auth()->user()->isAdminOrStaff()) @php($readiness = $student->progress?->overallPercent() ?? 0) @section('title', 'Student Profile') @section('subtitle', $student->student_number) @section('content') Progress report Book lesson @if ($canManage) Add invoice Edit profile @endif
{{ $student->user->initials() }}

{{ $student->user->name }}

{{ ucfirst($student->status) }} Class {{ $student->license_type }} @unless ($student->user->is_active) Portal disabled @endunless
{{ $student->user->email }} @if ($student->user->phone) · {{ $student->user->phone }} @endif @if ($student->user->address) · {{ $student->user->address }} @endif
{{ $readiness }}%
Readiness
{{ $attendanceRate }}%
Attendance
{{ money($balance) }}
Balance
@if ($canManage)
@csrf @method('DELETE')
@endif

Training progress

Hours, mock test and readiness

Full report
Theory hours {{ $student->progress?->theory_hours_completed ?? 0 }} / {{ $student->progress?->theory_hours_required ?? 0 }}
Practical hours {{ $student->progress?->practical_hours_completed ?? 0 }} / {{ $student->progress?->practical_hours_required ?? 0 }}
Overall readiness {{ $readiness }}%
Mock test {{ $student->progress?->mock_test_score ? $student->progress->mock_test_score.'%' : 'Not taken' }}
Final test {{ $student->progress?->final_test_date?->format('j M Y') ?? 'Not booked' }}
Result {{ ucfirst($student->progress?->final_test_result ?? 'pending') }}
Completed lessons {{ $student->bookings()->where('status', 'completed')->count() }}

Recent lessons

All lessons
@forelse ($recentBookings as $lesson) @empty @endforelse
DateLessonTrainerVehicleStatus
{{ $lesson->starts_at->format('j M Y') }}
{{ $lesson->starts_at->format('g:i A') }}
{{ $lesson->typeLabel() }} {{ $lesson->trainer?->user?->name ?? '—' }} {{ $lesson->vehicle?->registration_number ?? '—' }} {{ ucfirst($lesson->status) }}

Payments

@if ($canManage) New invoice @endif
@forelse ($student->payments->sortByDesc('due_date')->take(6) as $payment) @empty @endforelse
InvoiceDescriptionDueTotalBalanceStatus
{{ $payment->invoice_number }} {{ \Illuminate\Support\Str::limit($payment->description, 34) }} {{ $payment->due_date->format('j M Y') }} {{ money($payment->totalDue()) }} {{ money($payment->balance()) }} {{ ucfirst($payment->status) }}

Digital records

ID, medical, licence and contracts

@if ($canManage) @endif
@forelse ($student->documents as $document)
{{ $document->title }}
{{ \App\Models\Document::TYPES[$document->type] ?? ucfirst($document->type) }} @if ($document->expiry_date) · expires {{ $document->expiry_date->format('j M Y') }} @endif
@if ($canManage)
@csrf @method('DELETE')
@endif
@empty
@endforelse

Course & trainer

Course
{{ $student->course?->name ?? 'Not assigned' }}
@if ($student->course)
{{ $student->course->duration_weeks }} weeks · {{ money($student->course->fee) }} · Class {{ $student->course->license_type }}
@endif
Trainer
@if ($student->trainer)
{{ $student->trainer->user->initials() }}
{{ $student->trainer->user->name }}
{{ $student->trainer->specialization ?? $student->trainer->designation }}
@else
No trainer assigned yet.
@endif
Admitted
{{ $student->admission_date?->format('j M Y') }}
Date of birth
{{ $student->date_of_birth?->format('j M Y') ?? '—' }}
Blood group
{{ $student->blood_group ?? '—' }}
Gender
{{ ucfirst($student->gender ?? '—') }}
@if ($student->emergency_contact_name)
Emergency contact
{{ $student->emergency_contact_name }}
{{ $student->emergency_contact_phone }}
@endif

Attendance

All records
{{ $attendanceRate }}%
Attendance rate
{{ $student->attendance()->count() }} records
{{ $student->attendance()->where('status', 'absent')->count() }} absences
    @foreach ($attendance->take(4) as $record)
  • {{ $record->date->format('D, j M') }} {{ $record->booking?->typeLabel() ?? 'Manual entry' }}
    {{ ucfirst($record->status) }}
  • @endforeach
@if ($student->lessonReports->isNotEmpty())

Trainer feedback

    @foreach ($student->lessonReports->take(3) as $report)
  • {{ $report->trainer?->user?->name }} · {{ $report->rating }}/5 {{ \Illuminate\Support\Str::limit($report->performance_notes, 70) }}
  • @endforeach
@endif
@if ($canManage) @endif @endsection