{{-- HR Officer: one induction session — when, where, spaces, who is booked, and a search to book staff on. From HrCalendarController@session: $session, $active (attendees not cancelled / on leave). --}} @extends('layouts.app') @section('title', $session->title) @section('content') @include('partials.flash') @php $start = $session->startsAt(); $left = $session->capacity !== null ? max(0, (int) $session->capacity - $active->count()) : null; $statusCls = ['attended' => 'bg-primary/10 text-primary', 'registered' => 'bg-secondary-container text-on-surface', 'no_show' => 'bg-error-container text-error', 'cancelled' => 'bg-surface-container-high text-outline', 'on_leave' => 'bg-gold/20 text-[#8a6d3b]']; $statusLbl = ['registered' => 'Booked', 'attended' => 'Attended', 'no_show' => 'No show', 'cancelled' => 'Cancelled', 'on_leave' => 'On leave']; @endphp arrow_back Induction Calendar

{{ $session->title }}

{{ $session->trainerName() ?: 'Trainer to be confirmed' }}

@if($start->isPast()) Taken place @elseif($left === 0) Fully booked @else {{ $left === null ? 'Open' : $left.' '.\Illuminate\Support\Str::plural('space', $left).' left' }} @endif
event

When

{{ $start->format('l j F Y') }}

{{ $start->format('H:i') }} – {{ $start->copy()->addMinutes((int) $session->duration_minutes)->format('H:i') }}

{{ $session->format === 'online' ? 'videocam' : 'location_on' }}

Where

{{ $session->format === 'online' ? 'Online' : 'In person' }}

@if($session->location)

{{ $session->location }}

@endif
groups

Places

{{ $active->count() }}{{ $session->capacity !== null ? ' of '.$session->capacity : '' }} booked

{{-- Book staff: their recent new starters by default, or search anyone --}} @if(! $start->isPast() && $left !== 0)

person_search Book staff onto this induction

Your new starters from the last 90 days who aren’t booked onto an induction yet. Search to find anyone else.

person_add Add new starter
@csrf
search

Loading…

No one selected{{ $left !== null ? ' · '.$left.' '.\Illuminate\Support\Str::plural('space', $left).' left' : '' }}
@endif

Attendees

@forelse($session->attendees as $a)
{{ $a->initials() }}
{{ $a->name }} {{ $a->location?->name ?? 'No service' }}
{{ $statusLbl[$a->pivot->status] ?? ucfirst($a->pivot->status) }}
@empty

No one is booked yet.

@endforelse
@endsection