@extends('layouts.admin') @section('title', 'Demandes d\'audience au rectorat UAC') @section('content')

Compte-rendus d’audience

@foreach ($reports as $key => $report) @php $appointment = $report->appointment; $service = $appointment?->service; $role = auth()->user()->role; @endphp {{-- Date audience --}} {{-- Nom --}} {{-- Email --}} {{-- Service --}} {{-- Statut report --}} {{-- Actions --}} @endforeach
Date audience Requérant Email Service Statut Actions
@if($appointment?->scheduled_at)
{{ \Carbon\Carbon::parse($appointment->scheduled_at)->format('d/m/Y') }}
{{ \Carbon\Carbon::parse($appointment->scheduled_at)->format('H:i') }} @else @endif
{{ $appointment->first_name ?? '—' }} {{ $appointment->last_name ?? '' }}
{{ $appointment->email ?? '—' }} @if($service) {{ $service->name }} @else Non défini @endif @php $statusClass = match ($report->status) { 'pending' => 'bg-warning text-dark', 'confirmed' => 'bg-success text-white', 'rejected' => 'bg-danger text-white', default => 'bg-secondary text-white', }; @endphp {{ ucfirst(demandStatus($report->status)) }}
@endsection