{{-- My Vault — earned certificates + past session history. From EmployeeVaultController@index: $certificates, $sessionHistory --}} @extends('layouts.app') @section('title', 'My Vault') @section('content') @include('employee._flash') {{-- Externally-delivered training — upload proof for manager sign-off --}} @if(($externalItems ?? collect())->isNotEmpty())
verified

External training — upload your certificate

These courses are completed in an external system. Upload your certificate and your Service / Registered Manager signs it off — only then does the course count as complete.

@foreach($externalItems as $item) @include('employee._external-cert-card', ['course' => $item['course'], 'sub' => $item['submission']]) @endforeach
@endif {{-- Training already completed elsewhere (e.g. a previous employer) — upload for SM / RM to verify --}} @if(\Illuminate\Support\Facades\Route::has(auth()->user()->primaryRole().'.certificates.upload') && ($uploadableCourses ?? collect())->isNotEmpty())
has('rows') || $errors->has('rows.*')) open @endif> upload_file Already completed a course somewhere else? Upload your certificates (e.g. from a previous employer) — your Service / Registered Manager will check and approve them. add Upload certificates
@include('partials._certificate-rows', [ 'formId' => 'vaultCertRows', 'action' => route(auth()->user()->primaryRole().'.certificates.upload'), 'courses' => $uploadableCourses, 'submitLabel' => 'Send for approval', 'intro' => 'Add one row per certificate. You can add up to 20 at once. The course stays as it is until your manager approves the certificate.', ])
@endif {{-- My uploaded certificates (all sources) with their review status --}} @if(($myUploads ?? collect())->isNotEmpty()) @php $fileRoute = \Illuminate\Support\Facades\Route::has(auth()->user()->primaryRole().'.external-cert.file'); @endphp
fact_check

My uploaded certificates

@foreach($myUploads as $u) @endforeach
CourseCompletedUploadedStatus
{{ $u->course->title ?? 'Course' }} {{ $u->sourceLabel() }}{{ $u->provider ? ' · '.$u->provider : '' }} {{ optional($u->completion_date)->format('j M Y') }} {{ $u->created_at->format('j M Y') }} @if($fileRoute)View file@endif @if($u->isApproved()) check_circle Approved @if($u->reviewer)by {{ $u->reviewer->name }}@endif @elseif($u->isRejected()) error Not approved {{ $u->review_note }} @else hourglass_top Awaiting approval @endif
@endif {{-- Due for renewal --}} @if($renewals->isNotEmpty())
event_repeat

Due for Renewal

{{ $renewals->count() }}

These certificates have expired or expire within {{ $renewalWindowDays }} days. Retake the training to renew.

@foreach($renewals as $cert) @php $expired = $cert->expires_at->isPast(); $days = (int) round(now()->diffInDays($cert->expires_at, false)); @endphp

{{ $cert->course->title }}

@if($expired) Expired {{ $cert->expires_at->format('j M Y') }} @else Expires {{ $cert->expires_at->format('j M Y') }} · in {{ $days }} {{ Str::plural('day', $days) }} @endif

View
@csrf
@endforeach
@endif {{-- Certificates --}}
workspace_premium

Certificates

({{ $certificates->count() }})
@if($certificates->isEmpty())
workspace_premium

No certificates yet

Complete a course to earn your first certificate — it'll appear here.

@else
@foreach($certificates as $certificate) @php $expired = $certificate->expires_at && $certificate->expires_at->isPast(); $soon = $certificate->expires_at && ! $expired && $certificate->expires_at->lt(now()->addDays($renewalWindowDays)); $superseded = $certificate->is_superseded ?? false; @endphp
{{ $superseded ? 'history' : 'verified' }} @if($superseded) Renewed @elseif($expired) Expired @elseif($soon) Expiring soon @else Valid @endif

{{ $certificate->course?->title ?? 'Course' }}

{{ $certificate->certificate_number }}

@if($superseded)

check_circle Renewed — a newer certificate has replaced this one.

@endif
Issued
{{ $certificate->issued_at?->format('j M Y') ?? '—' }}
Expires
{{ $certificate->expires_at?->format('j M Y') ?? 'No expiry' }}
@if($certificate->score_percent !== null)
Score
{{ $certificate->score_percent }}%
@endif
@if($certificate->course) visibility View / Download @if(($expired || $soon) && ! $superseded)
@csrf
@endif @else block Course removed @endif
@endforeach
@endif {{-- Session Certificates (attendance) --}}
workspace_premium

Session Certificates

({{ $sessionCertificates->count() }})
@if($sessionCertificates->isEmpty())
co_present

No session certificates yet

Attend an instructor-led training session and your certificate of attendance will appear here.

@else
@foreach($sessionCertificates as $sc)
co_present Attendance

{{ $sc->session?->title ?? 'Training session' }}

{{ $sc->certificate_number }}

Held
{{ $sc->session?->session_date?->format('j M Y') ?? '—' }}
Type
{{ $sc->session ? ($sc->session->format === 'online' ? 'Online' : 'In-Person') : '—' }}
@if($sc->session?->trainer)
Trainer
{{ $sc->session->trainerName() }}
@endif
Issued
{{ $sc->issued_at?->format('j M Y') ?? '—' }}
@if($sc->session) visibility View / Download @else block Session removed @endif
@endforeach
@endif {{-- Session History --}}
history

Session History

({{ $sessionHistory->count() }})
@forelse($sessionHistory as $session) @php $badge = match($session['status']) { 'attended' => ['label' => 'Attended', 'class' => 'bg-secondary-container text-on-secondary-container', 'icon' => 'check_circle'], 'no_show' => ['label' => 'Missed', 'class' => 'bg-error-container text-error', 'icon' => 'cancel'], 'cancelled' => ['label' => 'Cancelled', 'class' => 'bg-surface-container-high text-outline', 'icon' => 'block'], default => ['label' => 'Registered', 'class' => 'bg-surface-container-high text-secondary', 'icon' => 'event_available'], }; @endphp @if(!empty($session['notes'])) @endif @empty @endforelse
Session Date Time Format Outcome
{{ $session['title'] }} {{ $session['date'] }} {{ $session['time'] }} {{ $session['format'] }} {{ $badge['icon'] }} {{ $badge['label'] }}

edit_note Trainer's notes

{{ $session['notes'] }}

No past sessions on record yet.
@endsection