@extends('layouts.app') @section('title', 'Appointment Details') @section('no-page-header') @section('content')
Appointment Details
@if(in_array($appointment->status, ['pending', 'confirmed'], true)) Edit @endif Back to Appointments
Appointment Information
ID: #{{ $appointment->id }}
Title: {{ $appointment->appointment_title }}
Client: {{ $appointment->client->name ?? 'N/A' }}
Date: {{ $appointment->appointment_date->format('d-m-Y') }}
Time: {{ $appointment->formatted_time }}
Number of Persons: {{ $appointment->no_of_persons }}
Contact: {{ $appointment->contact ?? 'N/A' }}
Created By: {{ $appointment->created_by ?? 'Customer' }}
Created: {{ $appointment->created_at->format('d-m-Y H:i') }}
Status: {{ ucfirst($appointment->status) }}
@if($appointment->notes)
Notes

{{ $appointment->notes }}

@endif @if($appointment->attendees && count($appointment->attendees) > 0)
Attendees ({{ count($appointment->attendees) }})
@foreach($appointment->attendees as $attendeeId) @php $member = $appointment->customerMembers->where('id', $attendeeId)->first(); @endphp @if($member)
{{ $member->name }}
@if($member->email)
{{ $member->email }}
@endif @if($member->mobile)
{{ $member->mobile }}
@endif
@endif @endforeach
@endif
Quick Actions
@if($appointment->status == 'pending')
@csrf
@endif @if($appointment->status == 'confirmed')
@csrf
@endif @if(in_array($appointment->status, ['pending', 'confirmed']))
@csrf
@endif @if(in_array($appointment->status, ['pending', 'confirmed'], true)) Edit Appointment @endif
Status Timeline
Created

{{ $appointment->created_at->format('d-m-Y H:i') }}

@if($appointment->status != 'pending')
Confirmed

{{ $appointment->updated_at->format('d-m-Y H:i') }}

@endif @if($appointment->status == 'completed')
Completed

{{ $appointment->updated_at->format('d-m-Y H:i') }}

@endif @if($appointment->status == 'cancelled')
Cancelled

{{ $appointment->updated_at->format('d-m-Y H:i') }}

@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