@extends('adminlte::page') @section('title', 'All Appointments') @section('content_header')

All Apointments

@stop @section('content')
@csrf
@if (session('success'))
{{ session('success') }}
@endif
@php $statusColors = [ 'Pending payment' => '#f39c12', 'Processing' => '#3498db', 'Confirmed' => '#2ecc71', 'Cancelled' => '#ff0000', 'Completed' => '#008000', 'On Hold' => '#95a5a6', 'Rescheduled' => '#f1c40f', 'No Show' => '#e67e22', ]; @endphp @foreach ($appointments as $appointment) @endforeach
# User Email Phone Staff Service Date Time Status Action
{{ $loop->iteration }} {{ $appointment->name }}
{{ $appointment->created_at->format('d M Y') }}
{{ $appointment->email }} {{ $appointment->phone }} {{ $appointment->employee->user->name }} {{ $appointment->service->title ?? 'NA' }} {{ $appointment->booking_date }} {{ $appointment->booking_time }} @php $status = $appointment->status; $color = $statusColors[$status] ?? '#7f8c8d'; @endphp {{ $status }}
@stop @section('css') @stop @section('js') {{-- hide notifcation --}} @endsection