{{-- Session Coverage Matrix (overview) — services (rows) × training topics (columns), each cell the % of the home's booked staff who attended that topic. From ManagementController@matrix (?type=sessions): $rows, $columns, $registeredManagers, $rmId, $q --}} @extends('layouts.app') @section('title', 'Session Matrix') @section('content') @include('partials.flash') @php $role = auth()->user()->primaryRole(); $matrixRoute = $role . '.compliance.matrix'; $indexRoute = $role . '.compliance.index'; $exportUrl = route($matrixRoute, array_filter(['type' => 'sessions', 'rm' => $rmId, 'q' => $q, 'format' => 'csv'])); @endphp {{-- E-Learning ⇄ Sessions --}}
@include('management._matrix-type-toggle', ['matrixRoute' => $matrixRoute, 'active' => 'sessions', 'params' => array_filter(['rm' => $rmId, 'q' => $q])])
{{-- Controls --}}
search
@if($registeredManagers->isNotEmpty())
@endif @if($rmId || $q) Reset @endif
{{ $rows->count() }} {{ Str::plural('service', $rows->count()) }} · {{ $columns->count() }} {{ Str::plural('topic', $columns->count()) }} download Export CSV
{{-- Legend --}}
All attended Partial Booked, none attended N/A Not booked Each cell shows the % of the home's booked staff who attended that training topic. The Medication Competency Pack is required at every service — its cell is the % of care workers currently competent. Click a service to see individuals.
@if($rows->isEmpty() || $columns->isEmpty())
event_busy

Nothing to show

No booked training sessions in this selection.

@else
@foreach($columns as $col) @endforeach @foreach($rows as $row) @foreach($row['cells'] as $cell) @endforeach @endforeach
Service
{{ \Illuminate\Support\Str::limit($col->title, 26) }}
{{ $row['service']->name }}

{{ $row['service']->code }}

@if($cell === null) N/A @else @php $bg = $cell['pct'] >= 100 ? 'bg-primary text-on-primary' : ($cell['pct'] > 0 ? 'bg-gold text-on-primary' : 'bg-surface-container-high text-on-surface-variant'); @endphp {{ $cell['pct'] }}% @if(! empty($cell['due'])) {{ $cell['due'] }} due @endif @endif
@endif @endsection