@extends('layouts.app') @section('namePage', 'Laporan Sertifikat') @section('content')

Laporan Sertifikat

Halaman ini menampilkan daftar pengguna yang telah mengunduh sertifikat.

@if (session('Alert'))
{{ session('Alert') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
{{-- Filter & Sort --}}
@php $per = (int)request('per_page', 12); @endphp
Reset {{-- Download Button --}}
{{-- Ringkasan --}}
@php $agg = $aggregates ?? null; $total = (int) ($agg->total ?? 0); $avg = is_null($agg?->avg_score) ? null : number_format($agg->avg_score, 2); $max = is_null($agg?->max_score) ? null : $agg->max_score; $min = is_null($agg?->min_score) ? null : $agg->min_score; @endphp
Total Sertifikat
{{ $total }}
Rata-rata Nilai
{{ $avg ?? '—' }}
Nilai Tertinggi
{{ $max ?? '—' }}
Nilai Terendah
{{ $min ?? '—' }}
{{-- Tabel Hasil --}}
@if ($sertifikats->isEmpty())
Belum ada pengguna yang mengunduh sertifikat.
@else
@foreach ($sertifikats as $index => $item) @php switch ($item->user->role) { case 'Trainer (SGB)': $perusahaan = 'PT Solid Gold Berjangka'; break; case 'Trainer (RFB)': $perusahaan = 'PT Rifan Financindo Berjangka'; break; case 'Trainer (EWF)': $perusahaan = 'PT Equity World Futures'; break; case 'Trainer (BPF)': $perusahaan = 'PT Best Profit Futures'; break; case 'Trainer (KPF)': $perusahaan = 'PT Kontak Perkasa Futures'; break; default: $perusahaan = '-'; break; } @endphp @endforeach
# Nama Perusahaan Cabang Nilai Tanggal Sertifikat Aksi
{{ ($sertifikats->firstItem() ?? 1) + $index }} {{ optional($item->user)->name ?? '—' }} {{ $perusahaan }} {{ optional($item->user)->cabang ?? '-' }} {{ $item->average_score }}/100 {{ optional($item->awarded_at)->format('d F Y - H:i') }} |
{{-- Pagination --}}
{{ $sertifikats->links() }}
@endif
@endsection @section('scripts') @endsection