@extends('layouts.app') @section('title', __('appointments::messages.appointments.calendar')) @php use App\Modules\Appointments\Enums\AppointmentStatus; use App\Modules\Appointments\Models\Appointment; /* | The legend, and the source of truth for what a colour on this screen | means. Cancelled and did-not-attend are deliberately absent: the events | feed asks for occupying appointments only, because a cancelled booking | releases its slot. Listing them here would promise a colour that never | appears on the grid. */ $legend = [ AppointmentStatus::Scheduled, AppointmentStatus::Confirmed, AppointmentStatus::CheckedIn, AppointmentStatus::InProgress, AppointmentStatus::Completed, ]; /* | Four figures for today, counted in the browser from the same feed the | grid draws. Nothing here can show cancellations for the reason above, so | the fourth card is the day's remaining work rather than a cancelled | count that would sit on zero for ever. */ $cards = [ ['key' => 'total', 'label' => __('appointments::messages.appointments.card_total'), 'icon' => 'bi-calendar-week-fill', 'tone' => 'violet'], ['key' => 'completed', 'label' => __('appointments::messages.appointments.card_completed'), 'icon' => 'bi-check-circle-fill', 'tone' => 'green'], ['key' => 'in_progress', 'label' => __('appointments::messages.calendar.card_in_clinic'), 'icon' => 'bi-person-walking', 'tone' => 'amber'], ['key' => 'upcoming', 'label' => __('appointments::messages.calendar.card_upcoming'), 'icon' => 'bi-clock-fill', 'tone' => 'blue'], ]; $views = [ 'dayGridMonth' => __('appointments::messages.calendar.view_month'), 'timeGridWeek' => __('appointments::messages.calendar.view_week'), 'timeGridDay' => __('appointments::messages.calendar.view_day'), 'listWeek' => __('appointments::messages.calendar.view_agenda'), ]; @endphp @section('content') {{-- ── Page head ──────────────────────────────────────────────────────── --}}
{{ __('appointments::messages.calendar.subtitle') }}
{{ $card['label'] }}
{{ __('common.loading') }}
{{ __('appointments::messages.appointments.empty_title') }}
{{ __('appointments::messages.calendar.empty_text') }}
@can('create', Appointment::class) {{ __('appointments::messages.appointments.book') }} @endcan