@extends('layouts.app') @section('title', 'Dashboard') @section('content') @include('partials.flash') @php $tiles = [ ['label' => 'Care Workers', 'value' => $stats['learners'], 'icon' => 'group', 'href' => \Illuminate\Support\Facades\Route::has('admin.users.index') ? route('admin.users.index') : null], ['label' => 'Compliance', 'value' => $stats['compliance'].'%', 'icon' => 'verified_user', 'href' => \Illuminate\Support\Facades\Route::has('admin.compliance.index') ? route('admin.compliance.index') : null], ['label' => 'Published Courses', 'value' => $stats['courses_published'], 'icon' => 'school', 'sub' => $stats['courses_total'].' total', 'href' => \Illuminate\Support\Facades\Route::has('admin.courses.index') ? route('admin.courses.index') : null], ['label' => 'Services', 'value' => $stats['services'], 'icon' => 'holiday_village', 'href' => \Illuminate\Support\Facades\Route::has('admin.services.index') ? route('admin.services.index') : null], ['label' => 'Overdue Courses', 'value' => $stats['overdue'], 'icon' => 'warning', 'tone' => 'text-error', 'href' => \Illuminate\Support\Facades\Route::has('admin.compliance.index') ? route('admin.compliance.index') : null], ]; @endphp {{-- KPI tiles --}}
{{ $t['value'] }}
{{ $t['label'] }}
@isset($t['sub']){{ $t['sub'] }}
@endisset {{ $t['href'] ? 'a' : 'div' }}> @endforeachCompletions per month · last 12 months
@php $W = 640; $H = 200; $pl = 8; $pr = 8; $pt = 14; $pb = 26; $n = count($monthly); $xf = fn ($i) => $pl + ($n <= 1 ? 0 : $i * ($W - $pl - $pr) / ($n - 1)); $yf = fn ($v) => $pt + ($H - $pt - $pb) * (1 - $v / $monthlyMax); $pts = collect($monthly)->map(fn ($p, $i) => round($xf($i), 1).','.round($yf($p['count']), 1)); $area = 'M '.round($xf(0), 1).','.round($H - $pb, 1).' L '.$pts->implode(' L ').' L '.round($xf($n - 1), 1).','.round($H - $pb, 1).' Z'; @endphpNo overdue training — nice work.
@endforelse{{ $log->description }}
{{ $log->user?->name ?? ($log->properties['email'] ?? 'System') }}
{{ $emailEnabled ? 'On — assignment & reminder emails send.' : 'Off — in-app notifications only.' }}
@if(\Illuminate\Support\Facades\Route::has('admin.settings')) Configure → @endif{{ $queue['waiting'] }} waiting — is the worker running?
@elseif($queue['failed'] > 0){{ $queue['failed'] }} failed {{ \Illuminate\Support\Str::plural('job', $queue['failed']) }} need attention.
@elseHealthy — {{ $queue['pending'] }} pending, none failed.
@endif{{ $s->title }}
{{ $s->session_date->format('j M Y') }} · {{ $s->booked }} booked{{ $s->trainerName() ? ' · '.$s->trainerName() : '' }}