@extends('layouts.main') @section('content')

Daftar Peserta Aktivitas

@php $rowIndex = 1; @endphp @foreach($participants as $peserta) @php $userParticipant = optional($peserta)->user; if (! $userParticipant) { continue; } $profileParticipant = optional($userParticipant->profile); @endphp @php $rowIndex++; @endphp @endforeach @if($rowIndex === 1) @endif
No Nama Provinsi Jumlah Cetak
{{ $rowIndex }} {{ $userParticipant->name ?? '-' }} {{ optional($profileParticipant->province)->name ?? ($profileParticipant->other_province ?? '-') }} {{ $peserta->print_count ?? 0 }}
Belum ada peserta
@php $uCard = auth()->user(); $pCard = optional($uCard->profile); $provinceCard = optional($pCard->province)->name ?? ($pCard->other_province ?? null); @endphp
{{ $activity->name ?? 'Sertifikat PESERTA' }}
@if(auth()->user()->profile && auth()->user()->profile->foto) @php $photoPath = auth()->user()->profile->foto; $publicPath = asset('assets/images/profilefoto/' . $photoPath); @endphp @else @endif
@php $qrLink = route('activity.download-certificate', ['id' => $activity->id]) . '?show_certificate=1'; try { $qrPng = \SimpleSoftwareIO\QrCode\Facades\QrCode::format('png')->size(80)->generate((string) $qrLink); $qrBase64 = 'data:image/png;base64,'.base64_encode($qrPng); } catch (\Throwable $e) { $qrBase64 = 'https://api.qrserver.com/v1/create-qr-code/?size=80x80&data='.urlencode((string) $qrLink); } @endphp QR Code
@php $user = auth()->user(); $isSuperAdmin = method_exists($user, 'isSuperAdmin') ? $user->isSuperAdmin() : ($user->role === 'superadmin'); $isAdmin = method_exists($user, 'isAdmin') ? $user->isAdmin() : ($user->role === 'admin'); $creator = $activity->user ?? \App\Models\User::find($activity->user_id); $isActivityOwner = method_exists($user, 'isCreator') ? ($user->isCreator() && $activity->user_id === $user->id) : false; $isCommitteeMember = method_exists($activity, 'canManageRegistration') ? $activity->canManageRegistration($user->id) : false; $canAccessPrinting = method_exists($activity, 'canAccessPrinting') ? $activity->canAccessPrinting($user, 'certificates') : ($isActivityOwner || $isCommitteeMember); $shouldShowButtons = $canAccessPrinting; @endphp {{-- Tiga tombol utama --}} @if($shouldShowButtons)
@endif {{-- Toggle Lihat Sertifikat (Hijau) --}} @if($shouldShowButtons) @php $certificateSettingsModel = \App\Models\CertificateSettings::where('activity_id', $activity->id)->first(); $downloadCardVisible = $certificateSettingsModel && isset($certificateSettingsModel->print_settings['download_card_visible']) ? (bool)$certificateSettingsModel->print_settings['download_card_visible'] : false; // Default non-aktif untuk aktivitas baru @endphp @endif
{{-- Tombol toggle menubar khusus mobile --}} @if($shouldShowButtons)
@endif

Pengaturan Teks Sertifikat

Mengedit: Pilih teks pada Sertifikat
(Aktual: 80px)
x
@php $bgDir = public_path('assets/images/certificate'); $bgFiles = glob($bgDir . '/*.{png,jpg,jpeg,gif,webp}', GLOB_BRACE); @endphp @if(count($bgFiles) > 0) @foreach($bgFiles as $file) @php $filename = basename($file); @endphp @php $isUploaded = DB::table('certificate_backgrounds')->where('filename', $filename)->exists(); @endphp
{{ $filename }} @if($isUploaded) @endif
@endforeach @endif
@endsection @push('styles') @endpush