{{-- resources/views/agent/appointments/index.blade.php --}} @extends('layouts.contentLayoutMaster') @section('title','My Appointments') @section('content') @php use Illuminate\Support\Facades\Route as R; @endphp
| When | Title | Client | Status | Location | {{-- Narrowed Actions column --}}Actions | |
|---|---|---|---|---|---|---|
| {{ optional($a->starts_at)->format('M d, Y g:i A') }} | {{ $a->title }} | @php $client = $a->client; $clientName = $client?->name; if (!$clientName) { $first = $client?->first_name ?? ''; $last = $client?->last_name ?? ''; $clientName = trim("$first $last"); } @endphp {{ $clientName !== '' ? $clientName : '—' }} | @php $statusColors = [ 'confirmed' => 'success', 'pending' => 'warning', 'cancelled' => 'danger', 'no show' => 'dark', 'completed' => 'primary' ]; $badgeColor = $statusColors[$a->status] ?? 'secondary'; @endphp {{ ucfirst($a->status) }} | {{ $a->location ?: '—' }} | ||
| @isset($activeClient) No appointment has been scheduled for this client, yet. @else No appointments yet. @endisset | ||||||