@extends('admin.layout.app') @section('title', __('admin.student_details') . ' - ' . $student->name) @php $dash = '—'; $placementValue = fn ($value, $fallback = '—') => filled($value) ? $value : $fallback; $formatDate = fn ($value, $format = 'Y-m-d') => $value ? \Illuminate\Support\Carbon::parse($value)->format($format) : '—'; $status = strtolower((string) ($academicPlacement['status'] ?? 'active')); $statusClass = match($status) { 'active' => 'success', 'graduated' => 'primary', 'inactive' => 'secondary', 'suspended' => 'warning', default => 'secondary', }; $healthClass = match($academicHealth['standing'] ?? 'good') { 'probation' => 'danger', 'at_risk' => 'warning', default => 'success', }; @endphp @section('body')

{{ __('admin.student_360_profile') }}

{{ __('admin.complete_student_academic_financial_and_activity_overview') }}

{{ __('admin.print') }} {{ __('admin.export_csv') }} {{ __('admin.edit') }} @if($profile && $profile->currentSemester && $profile->currentSemester->next_semester_id)
@csrf
@endif {{ __('admin.transcript') }} {{ __('admin.back') }}
@if(session('success') || session('msg'))
{{ session('success') ?: session('msg') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
{{ strtoupper(mb_substr($student->name, 0, 1)) }}

{{ $student->name }}

ID: {{ $student->id }} {{ $student->email ?: $dash }} {{ $student->phone ?: $dash }} {{ __('admin.student_no') }}: {{ $academicPlacement['student_no'] ?: $dash }} {{ $status }}
{{ $academicHealth['label'] }}
{{ $academicHealth['message'] }}
{{ __('admin.current_gpa') }}
{{ $latestResult->gpa ?? $dash }}
{{ __('admin.attendance_rate') }}
{{ $attendanceSummary['rate'] !== null ? $attendanceSummary['rate'].'%' : $dash }}
{{ __('admin.outstanding_fees') }}
{{ number_format($feeSummary['outstanding'], 2) }}
AFN
{{ __('admin.enrolled_courses') }}
{{ $student->courseEnrollments->count() }}
@if(count($profileAlerts))
{{ __('admin.profile_alerts') }}
@foreach($profileAlerts as $alert)
{{ $alert['title'] }}: {{ $alert['message'] }}
@endforeach
@endif
{{ __('admin.personal_information') }}
{{ __('admin.full_name') }}{{ $student->name }}
{{ __('admin.father_s_name') }}{{ $student->father_name ?: $dash }}
{{ __('admin.date_of_birth') }}{{ $formatDate($student->dob) }}
{{ __('admin.gender') }}{{ $student->gender ? ucfirst($student->gender) : $dash }}
{{ __('admin.tazkira_no') }}{{ $student->tazkira_no ?: $dash }}
{{ __('admin.agreement') }}{!! $student->agreement ? 'Accepted' : 'Not accepted' !!}
{{ __('admin.academic_placement') }}
{{ __('admin.university') }}{{ $placementValue($academicPlacement['university']) }}
{{ __('admin.faculty') }}{{ $placementValue($academicPlacement['faculty']) }}
{{ __('admin.department') }}{{ $placementValue($academicPlacement['department']) }}
{{ __('admin.program') }}{{ $placementValue($academicPlacement['program']) }}
{{ __('admin.current_semester') }}{{ $placementValue($academicPlacement['semester']) }}
{{ __('admin.status') }}{{ $status }}
{{ __('admin.contact_background') }}
{{ __('admin.email') }}{{ $student->email ?: $dash }}
{{ __('admin.phone') }}{{ $student->phone ?: $dash }}
{{ __('admin.country') }}{{ $student->country ?: $dash }}
{{ __('admin.address') }}{{ $student->address ?: $dash }}
{{ __('admin.last_education') }}{{ $student->last_education ?: $dash }}
{{ __('admin.current_job') }}{{ $student->current_job ?: $dash }}
{{ __('admin.account_information') }}
{{ __('admin.created_at') }}{{ $student->created_at ? $student->created_at->format('Y-m-d H:i') : $dash }}
{{ __('admin.updated_at') }}{{ $student->updated_at ? $student->updated_at->format('Y-m-d H:i') : $dash }}
{{ __('admin.desired_course') }}{{ $student->desired_course ?: $dash }}
{{ __('admin.signature_name') }}{{ $student->signature_name ?: $dash }}
{{ __('admin.signed_date') }}{{ $formatDate($student->signed_date) }}
{{ __('admin.failed_courses') }}
{{ $failedCourseCount }}
{{ __('admin.average_marks') }}
{{ $courseAverage !== null ? $courseAverage.'%' : $dash }}
{{ __('admin.academic_standing') }}
{{ $academicHealth['label'] }}
@forelse($student->courseResults->sortByDesc(fn($r) => optional($r->semester)->number ?? 0) as $cr) @empty @endforelse
{{ __('admin.course') }}{{ __('admin.semester') }}{{ __('admin.marks') }}{{ __('admin.grade') }}{{ __('admin.grade_point') }}{{ __('admin.status') }}
{{ $cr->course->title ?? $dash }}
{{ $cr->course->code ?? '' }}
{{ $cr->semester->name ?? (optional($cr->semester)->number ? 'Semester '.optional($cr->semester)->number : $dash) }} {{ $cr->total_marks !== null ? $cr->total_marks.'%' : $dash }} {{ $cr->gradeScale->name ?? $cr->grade ?? $dash }} {{ $cr->grade_point ?? $dash }} {{ ($cr->is_passed ?? false) ? 'Passed' : 'Not Passed' }}
{{ __('admin.no_records') }}
{{ __('admin.total_days') }}
{{ $attendanceSummary['total'] }}
{{ __('admin.present') }}
{{ $attendanceSummary['present'] }}
{{ __('admin.absent') }}
{{ $attendanceSummary['absent'] }}
{{ __('admin.rate') }}
{{ $attendanceSummary['rate'] !== null ? $attendanceSummary['rate'].'%' : $dash }}
@forelse($student->attendances->sortByDesc('date')->take(30) as $att) @php($attStatus = strtolower((string) $att->status)) @empty @endforelse
{{ __('admin.date') }}{{ __('admin.course') }}{{ __('admin.status') }}
{{ $att->date ?: $dash }} {{ $att->course->title ?? $dash }} {{ $attStatus ?: $dash }}
{{ __('admin.no_records') }}
{{ __('admin.net_fees') }}
{{ number_format($feeSummary['net'], 2) }}
{{ __('admin.paid') }}
{{ number_format($feeSummary['paid'], 2) }}
{{ __('admin.outstanding') }}
{{ number_format($feeSummary['outstanding'], 2) }}
@forelse($student->studentFees->sortBy('semester_id') as $fee) @empty @endforelse
{{ __('admin.semester') }}{{ __('admin.net') }}{{ __('admin.paid') }}{{ __('admin.outstanding') }}{{ __('admin.due_date') }}
{{ $fee->semester->name ?? $dash }} {{ number_format((float) $fee->net_amount, 2) }} {{ number_format((float) $fee->paid_amount, 2) }} {{ number_format((float) $fee->outstanding, 2) }} {{ $fee->due_date ? $fee->due_date->format('Y-m-d') : $dash }}
{{ __('admin.no_records') }}
@forelse($student->semesterResults->sortBy('semester_id') as $res) @php($resStatus = strtolower((string) $res->status)) @empty @endforelse
{{ __('admin.semester') }}{{ __('admin.gpa') }}{{ __('admin.status') }}{{ __('admin.result_date') }}
{{ $res->semester->name ?? (optional($res->semester)->number ? 'Semester '.optional($res->semester)->number : $dash) }} {{ $res->gpa ?? $dash }} {{ $resStatus ?: $dash }} {{ $res->result_date ?: $dash }}
{{ __('admin.no_records') }}
@forelse($recentActivities as $act) @empty @endforelse
{{ __('admin.activity') }}{{ __('admin.course') }}{{ __('admin.time') }}
{{ ucfirst(str_replace('_', ' ', $act->activity_type ?? 'Activity')) }} {{ $act->course->title ?? $dash }} {{ $act->occurred_at ? $act->occurred_at->format('Y-m-d H:i') : ($act->created_at ? $act->created_at->format('Y-m-d H:i') : $dash) }}
{{ __('admin.no_records') }}
@endsection