@extends('layouts/contentNavbarLayout') @section('title', 'View Agreement') @section('vendor-style') @endsection @section('content')

Agreement & Expiry

All Agreements
@if (session('success')) @endif @if (session('error')) @endif
@if($studentId) Filtered by student ID: {{ $studentId }} @endif
@forelse($students as $s) @php $firstAg = $s->agreementHistories->sortBy('from_date')->first(); $latestAg = $s->agreementHistories->sortByDesc('to_date')->first(); @endphp @empty @endforelse
Student Room / Bed Admission Date Leaving Date Actions
@if($s->documents->where('document_type', 'profile_photo')->first()) @else {{ strtoupper(mb_substr($s->first_name ?? '', 0, 1)) }} @endif
{{ $s->full_name }} {{ $s->student_mobile ?? '—' }}
{{ $s->room_bed_identifier ?? '—' }} {{ $firstAg?->from_date?->format('d/m/Y') ?? '—' }} {{ $latestAg?->to_date?->format('d/m/Y') ?? '—' }} @include('admin.agreements._remark_modal', ['student' => $s])
No students with agreements match the selected filter.
@endsection