@extends('layouts.admin', [ 'title' => 'Appointment Details', 'pageTitle' => 'Appointment Details', 'active' => 'appointments', ]) @php $statusVariants = [ 'pending' => 'warning', 'confirmed' => 'primary', 'checked_in' => 'purple', 'completed' => 'success', 'cancelled' => 'danger', 'no_show' => 'muted', ]; @endphp @section('content')
Back to Appointments
Update Status Edit Appointment
@if (session('status'))
{{ session('status') }}
@endif
{{ $appointment->customer?->initials ?? 'CU' }}

{{ $appointment->customer?->name ?? 'Customer removed' }}

{{ $appointment->status_label }}

{{ $appointment->service?->name ?? 'Service removed' }} with {{ $appointment->staffProfile?->name ?? 'Unassigned' }}

Total Amount

${{ number_format((float) $appointment->price, 2) }}

{{ \Illuminate\Support\Str::headline($appointment->payment_status) }}

Date

{{ $appointment->starts_at?->format('M d, Y') }}

Time

{{ $appointment->starts_at?->format('g:i A') }} - {{ $appointment->ends_at?->format('g:i A') }}

Duration

{{ $appointment->duration_minutes }} min

Booking

{{ $appointment->booking_number }}

Customer Notes

{{ $appointment->customer_notes ?: 'No customer notes saved.' }}

Internal Notes

{{ $appointment->internal_notes ?: 'No internal notes saved.' }}

@forelse ($statusLogs as $log)

{{ \App\Enums\AppointmentStatus::tryFrom($log->to_status)?->label() ?? \Illuminate\Support\Str::headline($log->to_status) }}

{{ $log->created_at?->format('M d, Y \\a\\t g:i A') }}{{ $log->changedBy ? ' by ' . $log->changedBy->name : '' }}

@if ($log->note)

{{ $log->note }}

@endif
@empty

No status history recorded yet.

@endforelse
{{ $appointment->customer?->phone ?? 'No phone saved' }}
{{ $appointment->customer?->email ?? 'No email saved' }}
{{ $appointment->customer?->appointments()->count() ?? 0 }} previous bookings
Email confirmation Ready
WhatsApp reminder Ready
Update Status Send Reminder
@csrf @method('DELETE') Delete Appointment
@push('modals') @include('admin.appointments.partials.create-modal', ['modalAppointment' => $appointment, 'mode' => 'edit', 'modalId' => 'edit-appointment-modal-' . $appointment->id]) @include('admin.appointments.partials.status-modal', ['modalAppointment' => $appointment, 'modalId' => 'status-appointment-modal-' . $appointment->id]) @endpush @endsection