@extends('layouts/contentNavbarLayout') @section('title', 'Student Details - ' . $student->full_name) @section('content')

Student Details

@if (session('success')) @endif
{{-- Profile card --}}
@php $profileDoc = $student->documents->where('document_type', 'profile_photo')->first(); @endphp @if($profileDoc) Profile @else {{ strtoupper(mb_substr($student->first_name ?? '', 0, 1)) }} @endif
{{ $student->full_name }}

{{ config('student_registration.status.' . $student->status, $student->status) }} · {{ config('student_registration.form_status.' . $student->form_status, $student->form_status) }}

@if($student->room_bed_identifier)

Room / Bed: {{ $student->room_bed_identifier }}

@endif
{{-- Personal & Hostel --}}
Personal
Email
{{ $student->email ?? '—' }}
Mobile
{{ $student->student_mobile ?? '—' }}
Parent Mobile
{{ $student->parent_mobile ?? '—' }}
DOB
{{ $student->date_of_birth?->format('d/m/Y') ?? '—' }}
Aadhar
{{ $student->aadhar_number ?? '—' }}
Address
{{ trim(implode(', ', array_filter([$student->permanent_locality, $student->permanent_taluka, $student->permanent_district, $student->permanent_state]))) ?: '—' }}

Hostel & College
Room / Bed
{{ $student->room_bed_identifier ?? '—' }}
College
{{ $student->college_name ?? '—' }}
Stream
{{ $student->stream ? config('student_registration.streams.' . $student->stream, $student->stream) : '—' }}
Standard / Year
{{ $student->standard_year ?? '—' }}
Reference
{{ $student->reference_name ? $student->reference_name . ($student->reference_contact ? ' (' . $student->reference_contact . ')' : '') : '—' }}
{{-- Student Documents --}}
Student Documents
Upload / Edit
@php $documentTypes = config('student_registration.document_types', []); @endphp @if($student->documents->isEmpty())

No documents uploaded.

@else
@foreach($student->documents as $doc) @endforeach
TypeFileSize
{{ $documentTypes[$doc->document_type] ?? $doc->document_type }} {{ $doc->original_name ?? basename($doc->file_path) }} {{ $doc->file_size ? number_format($doc->file_size / 1024, 1) . ' KB' : '—' }}
@endif
{{-- Agreement History --}}
Agreement History
View / Add
@if($student->agreementHistories->isEmpty())

No agreement records.

@else
@foreach($student->agreementHistories->sortBy('from_date') as $ag) @endforeach
FromTo
{{ $ag->from_date?->format('d/m/Y') ?? '—' }} {{ $ag->to_date?->format('d/m/Y') ?? '—' }}
@endif
{{-- Deposit --}} @if($student->deposits->isNotEmpty())
Deposits
@foreach($student->deposits as $d) @endforeach
FromToAmountPaymentDate
{{ $d->from_date?->format('d/m/Y') ?? '—' }} {{ $d->to_date?->format('d/m/Y') ?? '—' }} {{ $d->amount ? '₹' . number_format($d->amount, 2) : '—' }} {{ $d->payment_mode ? config('student_registration.payment_modes.' . $d->payment_mode, $d->payment_mode) : '—' }} {{ $d->actual_deposit_date?->format('d/m/Y') ?? '—' }}
@endif {{-- Payment / Rent History --}}
Payment History (Rent)
Add Rent
@if($student->rents->isEmpty())

No rent payments recorded.

@else
@foreach($student->rents->sortByDesc('paid_at') as $r) @endforeach
Period FromPeriod ToAmountModePaid On
{{ $r->period_from?->format('d/m/Y') ?? '—' }} {{ $r->period_to?->format('d/m/Y') ?? '—' }} {{ $r->amount ? '₹' . number_format($r->amount, 2) : '—' }} {{ $r->payment_mode ? config('student_registration.payment_modes.' . $r->payment_mode, $r->payment_mode) : '—' }} {{ $r->paid_at?->format('d/m/Y H:i') ?? '—' }}
@endif
{{-- Room History --}}
Room History
@if($student->bedHistory->isEmpty())

No room transfer history. Current: {{ $student->room_bed_identifier ?? '—' }}

@else
@foreach($student->bedHistory->sortByDesc('allotted_at') as $h) @endforeach
FloorRoomBedAllotted AtLeft At
{{ $h->floor->name ?? '—' }} {{ $h->room->name ?? '—' }} {{ $h->bed->name ?? '—' }} {{ $h->allotted_at?->format('d/m/Y H:i') ?? '—' }} {{ $h->left_at?->format('d/m/Y H:i') ?? '—' }}

Current: {{ $student->room_bed_identifier ?? '—' }}

@endif
{{-- Remarks --}}
@if($student->remarks->isEmpty())

No remarks recorded. Use View Agreement to add a remark.

@else
    @foreach($student->remarks->sortByDesc('remarked_at') as $rm)
  • {{ $rm->remarked_at->format('d/m/Y') }} — {{ $rm->remark }}
  • @endforeach
@endif
@endsection