@extends('layout.layout') @section('content')
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if (session('paypal_url')) @endif
@if ($requests->isEmpty())

No freeze/unfreeze requests found for this student

@else
All Requests ({{ $requests->total() }})
@foreach ($requests as $req) @php $latestStudentVisibleNote = $req->notes->firstWhere('show_to_student', true); @endphp @endforeach
# Type Subject Description Status Priority Date Actions
{{ $req->id }} @if ($req->type === 'freeze') Freeze @else Unfreeze @endif {{ $req->subject }} {{ Str::limit($req->description, 50) }} @if ($req->status === 'unsolved' && $req->status_note)
Reason: {{ $req->status_note }}
@endif
@if ($req->status === 'pending') Pending @elseif ($req->status === 'solved') Solved @elseif ($req->status === 'unsolved') Unsolved @endif @if ($req->priority === 'high') High @elseif ($req->priority === 'medium') Medium @else Low @endif {{ $req->created_at->format('M d, Y') }} @if ($req->admin_id == auth()->id() && $req->status === 'pending')
@if ($req->type === 'freeze') @endif
@if ($req->type === 'freeze') @endif @else - @endif
@if ($latestStudentVisibleNote)
آخر رد ظاهر للطالب
{{ $latestStudentVisibleNote->staff?->full_name ?: 'N/A' }} - {{ $latestStudentVisibleNote->created_at?->format('Y-m-d H:i') }}
{{ $latestStudentVisibleNote->content }}
@endif
Notes
{{ $req->notes->count() }} note(s)
@csrf
@forelse ($req->notes as $note)
{{ $note->staff?->full_name ?: 'N/A' }} @if ($note->show_to_student) Visible to student @else Internal only @endif
{{ $note->created_at?->format('Y-m-d H:i') }}
{{ $note->content }}
@empty
No notes yet.
@endforelse
{{ $requests->links() }}
@endif
@endsection @push('scripts') @endpush