@extends('layouts.app') @section('title', 'Trainer Dashboard') @section('content') @include('partials.flash') {{-- Hero + create --}}

Welcome, {{ auth()->user()->name }}

Schedule training, mark attendance and share your notes with attendees.

add Create Session
{{-- KPI tiles --}}
@php $tiles = [ ['label' => 'Upcoming Sessions', 'value' => $stats['upcoming'], 'icon' => 'event_upcoming', 'class' => 'text-primary'], ['label' => 'Sessions Delivered', 'value' => $stats['past'], 'icon' => 'history', 'class' => 'text-on-surface-variant'], ['label' => 'Attendances', 'value' => $stats['attended'], 'icon' => 'how_to_reg', 'class' => 'text-primary'], ['label' => 'Attendance Rate', 'value' => $stats['attendance_rate'] === null ? '—' : $stats['attendance_rate'].'%', 'icon' => 'insights', 'class' => 'text-primary'], ]; @endphp @foreach($tiles as $tile)
{{ $tile['icon'] }}

{{ $tile['value'] }}

{{ $tile['label'] }}

@endforeach
{{-- Analytics: attendance outcome + monthly delivery --}}
{{-- Attendance outcome (status breakdown) --}}

Attendance outcome

Across {{ $stats['past'] }} delivered {{ Str::plural('session', $stats['past']) }}

@if($attendance['expected'] > 0) @php $segs = [ ['key' => 'attended', 'label' => 'Attended', 'value' => $attendance['attended'], 'bar' => 'bg-primary', 'dot' => 'bg-primary', 'ic' => 'check_circle', 'ink' => 'text-primary'], ['key' => 'no_show', 'label' => 'No-show', 'value' => $attendance['no_show'], 'bar' => 'bg-error', 'dot' => 'bg-error', 'ic' => 'cancel', 'ink' => 'text-error'], ['key' => 'awaiting', 'label' => 'Not marked', 'value' => $attendance['awaiting'], 'bar' => 'bg-gold', 'dot' => 'bg-gold', 'ic' => 'schedule', 'ink' => 'text-[#8a6d3b]'], ]; @endphp
@foreach($segs as $s) @if($s['value'] > 0)
@endif @endforeach
@foreach($segs as $s)
{{ $s['ic'] }}

{{ $s['value'] }}

{{ $s['label'] }}

@endforeach
@else

No delivered sessions yet.

@endif
{{-- Sessions delivered per month (single-hue magnitude) --}}

Sessions delivered

Last 6 months

@foreach($monthly as $m)
{{ $m['count'] ?: '' }}
{{ $m['label'] }}
@endforeach
{{-- Attendance by training --}} @if($byTraining->isNotEmpty())

Attendance by training

Which trainings draw and hold their attendees

@foreach($byTraining as $t) @endforeach
Training Sessions Attended Attendance rate
{{ $t->title }} {{ $t->sessions }} {{ $t->attended }}/{{ $t->expected }}
{{ $t->rate }}%
@endif {{-- Upcoming --}}
event_upcoming

Your Upcoming Sessions

All trainings
@if($upcoming->isEmpty())
event_available

No upcoming sessions

Create your first training session to get started.

add Create Session
@else
@foreach($upcoming as $session) @php $view = route('trainer.sessions.show', $session); @endphp @endforeach
Session Date & Time Format Booked Action
{{ $session->title }} @if($session->trainerRoleFor(auth()->id()) === 'support') handshakeSupporting @endif {{ $session->session_date->format('j M Y') }} · {{ \Carbon\Carbon::parse($session->start_time)->format('H:i') }} {{ $session->format === 'in_person' ? 'In-Person' : 'Online' }} {{ $session->booked_count }}{{ $session->capacity ? ' / ' . $session->capacity : '' }} visibility View
@endif @endsection