{{-- My Vault (trainer) — e-learning certificates only. From EmployeeVaultController@elearning: $certificates, $renewals, $renewalWindowDays --}} @extends('layouts.app') @section('title', 'My Vault') @section('content') @include('partials.flash')

My Vault

Certificates you’ve earned from completing your e-learning.

{{-- 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 in My Learning 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 @endsection