@extends('layouts.app') @section('title', 'Today\'s Appointments') @section('no-page-header') @section('content')
Today's Appointments ({{ $appointments->count() }})
@if($appointments->count() > 0)
{{ $appointments->count() }}
Today's Total
{{ $appointments->where('status', 'pending')->count() }}
Pending
{{ $appointments->where('status', 'confirmed')->count() }}
Confirmed
{{ $appointments->where('status', 'completed')->count() }}
Completed
@foreach($appointments as $appointment)
{{ $appointment->appointment_title }}
{{ ucfirst($appointment->status) }}
Client: {{ $appointment->client->name ?? 'N/A' }}
Date: {{ $appointment->appointment_date->format('d-m-Y') }}
Time: {{ $appointment->formatted_time }}
Persons: {{ $appointment->no_of_persons }}
@if($appointment->contact)
Contact: {{ $appointment->contact }}
@endif @if($appointment->notes)
{{ $appointment->notes }}
@endif
View @if(in_array($appointment->status, ['pending', 'confirmed'], true)) Edit @endif @if($appointment->status == 'pending')
@csrf
@endif @if($appointment->status == 'confirmed')
@csrf
@endif @if(in_array($appointment->status, ['pending', 'confirmed']))
@csrf
@endif
@endforeach
@else

No appointments today

There are no appointments scheduled for today.

Schedule New Appointment
@endif
@endsection @php function getStatusBadgeClass($status) { return match($status) { 'pending' => 'bg-yellow-100 text-yellow-800', 'confirmed' => 'bg-blue-100 text-blue-800', 'completed' => 'bg-green-100 text-green-800', 'cancelled' => 'bg-red-100 text-red-800', default => 'bg-gray-100 text-gray-800' }; } @endphp