@php $defaultPhoto = asset('assets/images/profilefoto/default-profile.png'); $list = $participants ?? collect(); if ($list instanceof \Illuminate\Contracts\Pagination\Paginator || $list instanceof \Illuminate\Contracts\Pagination\LengthAwarePaginator) { $list = collect($list->items()); } elseif (! $list instanceof \Illuminate\Support\Collection) { $list = collect(is_array($list) ? $list : []); } $disableClick = isset($disable_click) ? (bool) $disable_click : false; @endphp @forelse($list as $user) @php $fotoUrl = optional($user->profile)->foto_url ?? $defaultPhoto; $pivotStatus = (int) ($user->pivot->status ?? -1); $statusText = '-'; $statusClass = 'status-unknown'; if ($pivotStatus === \App\Models\ActivityUser::STATUS_ACTIVE) { $statusText = 'Aktif'; $statusClass = 'status-active'; } elseif ($pivotStatus === \App\Models\ActivityUser::STATUS_VERIFICATION) { $statusText = 'Sedang Verifikasi'; $statusClass = 'status-pending'; } elseif ($pivotStatus === \App\Models\ActivityUser::STATUS_REJECTED) { $statusText = 'Ditolak'; $statusClass = 'status-rejected'; } $provinceName = optional(optional($user->profile)->province)->name ?? (optional($user->profile)->other_province ?? '-'); $regencyName = optional(optional($user->profile)->regency)->name ?? (optional($user->profile)->other_regency ?? '-'); @endphp