@extends('layouts.main') @section('content') @push('styles') @endpush

Daftar Peserta

Total: {{ $participants->count() }} peserta
@php $canManage = auth()->user() && $activity->canManageRegistration(auth()->id()); @endphp @if($canManage && (($activity->price ?? 0) <= 0))
@csrf
@endif
@if($participants->count() > 0) @foreach($participants as $index => $participant) @php $user = $participant->user; $province = optional(optional($user->profile)->province)->name ?? (optional($user->profile)->other_province ?? '-'); $status = (int) $participant->status; $statusText = match($status){ \App\Models\ActivityUser::STATUS_ACTIVE => 'Aktif', \App\Models\ActivityUser::STATUS_VERIFICATION => 'Sedang Verifikasi', \App\Models\ActivityUser::STATUS_REJECTED => 'Ditolak', default => 'Tidak Diketahui' }; $statusClass = $status == \App\Models\ActivityUser::STATUS_ACTIVE ? 'badge-success' : ($status == \App\Models\ActivityUser::STATUS_VERIFICATION ? 'badge-warning' : 'badge-danger'); $isAdmin = auth()->user() && (auth()->user()->isAdmin() || auth()->user()->isSuperAdmin()); $isAccountVerified = (bool) ($user->email_verified_at ?? false); $accountText = $isAccountVerified ? 'Akun Terverifikasi' : 'Akun Belum Verifikasi'; $accountClass = $isAccountVerified ? 'badge-success' : 'badge-warning'; @endphp @endforeach
No Nama Email Provinsi Akun Status Aksi
{{ $index + 1 }} {{ $user->name ?? '-' }} {{ $user->email ?? '-' }} {{ $province }} {{ $accountText }} @if($isAdmin) {{ $statusText }} @else {{ $statusText }} @endif @if($isAdmin)
@csrf @method('DELETE')
@else - @endif
@else

Belum ada peserta terdaftar

@endif
@endsection @section('scripts') @endsection