@extends('layouts.app') @section('title', 'Session') @section('content') arrow_back Back to My Trainings @include('partials.flash') @php $isPast = $session->session_date->isPast(); @endphp {{-- Session header --}}

{{ $session->title }}

@if($session->training_code) sell{{ $session->training_code }} @endif {{ $session->format === 'in_person' ? 'In-Person' : 'Online' }} @if($isPast)Completed@endif
calendar_month{{ $session->session_date->format('l, j F Y') }} schedule{{ \Carbon\Carbon::parse($session->start_time)->format('H:i') }} · {{ $session->duration_minutes }} min {{ $session->format === 'online' ? 'videocam' : 'location_on' }}{{ $session->format === 'online' ? ($session->teams_link ? 'Microsoft Teams' : 'Online') : ($session->location ?? 'Venue TBC') }}
@unless($isPast) edit Edit @endunless
@csrf @method('DELETE')
@if($session->recurrence_group_id)
@csrf @method('DELETE')
@endif
{{-- Attendance --}}
how_to_reg

Attendance

({{ $attendees->count() }})
@php $open = $session->attendanceOpen(); $sum = [ 'attended' => $attendees->where('pivot.status', 'attended')->count(), 'no_show' => $attendees->where('pivot.status', 'no_show')->count(), 'on_leave' => $attendees->where('pivot.status', 'on_leave')->count(), ]; @endphp {{-- Attendance window notice --}} @unless($open)
schedule

Attendance not open yet

You can mark attendance from {{ $session->attendanceOpensAt()->format('H:i, j M Y') }} — 10 minutes before the training starts.

@endunless {{-- Attendance summary (report) --}} @if($sum['attended'] || $sum['no_show'] || $sum['on_leave'])
{{ $sum['attended'] }} attended @if($sum['no_show']){{ $sum['no_show'] }} no-show@endif @if($sum['on_leave']){{ $sum['on_leave'] }} on leave@endif
@endif
@csrf
@if($attendees->isEmpty())
No one is booked onto this session yet.
@else
    @foreach($attendees as $attendee) @php $st = $attendee->pivot->status; $badge = match($st) { 'attended' => ['label' => 'Attended', 'class' => 'text-primary'], 'no_show' => ['label' => 'No-show', 'class' => 'text-error'], 'on_leave' => ['label' => 'On leave', 'class' => 'text-[#8a6d3b]'], default => ['label' => 'Booked', 'class' => 'text-outline'], }; $onLeave = $st === 'on_leave'; @endphp
  • {{ strtoupper(collect(explode(' ', $attendee->name))->map(fn($n) => $n[0] ?? '')->take(2)->implode('')) }}

    {{ $attendee->name }}

    {{ $badge['label'] }}@if($attendee->pivot->note) · {{ $attendee->pivot->note }}@endif

  • @endforeach

{{ $open ? 'Tick everyone who attended, then save. You can update this later.' : 'Opens '.$session->attendanceOpensAt()->diffForHumans().'.' }}

@endif
{{-- Training notes --}}
edit_note

Training Notes

@csrf

These notes are shared with attendees after the session (summary, follow-up actions, resources).

@endsection