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

Demandes d'audience

{{ count($appointments) }} demande(s) au total

{{ $appointments->where('status', 'pending')->count() }}

En attente

{{ $appointments->where('status', 'confirmed')->count() }}

Confirmés

{{ $appointments->where('status', 'rejected')->count() }}

Rejetés

{{ $appointments->where('status', 'canceled')->count() }}

Annulés

@foreach ($appointments as $key => $appointment) @endforeach
Nom Contact Objet Date de soumission Date demandée Status Date Programmée Actions
{{ $appointment->first_name }} {{ $appointment->last_name }}
{{ $appointment->first_name }} {{ $appointment->last_name }}
{{ $appointment->email }}
{{ $appointment->mobile }}
{{ $appointment->subject }}
{{ \Carbon\Carbon::parse($appointment->created_at)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($appointment->created_at)->format('H:i') }}
@if ($appointment->requested_at)
{{ \Carbon\Carbon::parse($appointment->requested_at)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($appointment->requested_at)->format('H:i') }}
@else - @endif
@php $class = ''; $icon = ''; switch ($appointment->status) { case 'pending': $class = 'bg-warning text-dark'; $icon = 'bi-clock'; break; case 'confirmed': $class = 'bg-success text-white'; $icon = 'bi-check-circle'; break; case 'rejected': $class = 'bg-danger text-white'; $icon = 'bi-x-circle'; break; case 'canceled': $class = 'bg-secondary text-white'; $icon = 'bi-calendar-x'; break; case 'processing': $class = 'bg-info text-white'; $icon = 'bi-info-circle'; break; default: $class = 'bg-info text-white'; $icon = 'bi-info-circle'; break; } @endphp {{ demandStatus($appointment->status) }} @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
@endsection @section('scripts') @if (session('modal') == 'appointment') @endif @endsection