{{-- Medication Competency Pack — every care worker at the manager's homes with their competency state; start / continue / renew / upload from here. From MedicationCompetencyController@index: $rows, $services, $counts, $preService --}} @extends('layouts.app') @section('title', 'Medication Competency Pack') @section('content') @include('partials.flash') @php $role = auth()->user()->primaryRole(); $r = fn ($n, $p = []) => route($role.'.medication-competency.'.$n, $p); $tiles = [ ['competent', 'verified', 'text-primary', 'bg-primary/10', 'Competent', $counts['competent'] ?? 0], ['due_soon', 'schedule', 'text-[#C2410C]', 'bg-[#FFEDD5]', 'Due in 3 months', $counts['due_soon'] ?? 0], ['needs', 'error', 'text-error', 'bg-error/10', 'Expired / not yet competent', ($counts['expired'] ?? 0) + ($counts['not_competent'] ?? 0)], ['in_progress', 'pending', 'text-[#8a6d3b]', 'bg-gold/15', 'In progress', $counts['in_progress'] ?? 0], ['not_assessed', 'radio_button_unchecked', 'text-on-surface-variant', 'bg-surface-container-high', 'Not assessed', $counts['not_assessed'] ?? 0], ]; @endphp
medication Everyone below Registered Manager must be assessed as competent at least once every 12 months, after their medication training — care workers by their SM / RM, and Service Managers by their Registered Manager. New staff — or anyone who has had a medication error — have the full assessment (three observed assessments, knowledge questions and the additional competencies you choose). Otherwise use the annual refresher. You can also upload a previous paper record.
| Staff member | Service | Status | Last assessed | Renewal due | Action |
|---|---|---|---|---|---|
| {{ $row['user']->name }} @if($row['is_sm'])Service Manager@endif {{ $row['user']->email }} | {{ implode(', ', $row['homes']) ?: '—' }} | {{ $icon }} {{ $label }} @if($open && $row['state'] !== 'in_progress') @php [$d, $t] = $open->type === 'full' ? $open->progress() : [0, 1]; @endphp Renewal in progress{{ $open->type === 'full' ? " · {$d}/{$t}" : '' }} @elseif($open && $open->type === 'full') @php [$d, $t] = $open->progress(); @endphp Visit {{ $open->currentVisit() ?? 3 }} · {{ $d }}/{{ $t }} signed off @endif | {{ $cur?->assessed_at?->format('j M Y') ?? '—' }} @if($cur){{ $cur->typeLabel() }}@endif | {{ $cur?->expires_at?->format('j M Y') ?? '—' }} | @if($open) play_arrow Continue @elseif(in_array($row['state'], ['competent'], true)) visibility View @else {{ $cur ? 'autorenew' : 'add_task' }} {{ $cur ? 'Re-assess' : 'Start' }} @endif |