@extends('admin.layout') @section('title', 'Gebruikers') @section('content') @php $sortLink = function(string $column, string $label) use ($sort, $dir): string { $newDir = ($sort === $column && $dir === 'asc') ? 'desc' : 'asc'; $arrow = $sort === $column ? '' . ($dir === 'asc' ? '↑' : '↓') . '' : ''; $url = route('admin.users.index', array_merge(request()->query(), ['sort' => $column, 'dir' => $newDir])); return '' . $label . $arrow . ''; }; $icoHeartOut = '👍'; $icoHeartFill = '👀'; $icoMatch = '🔗'; @endphp {{-- Filters --}}
Reset CSV
{{-- Table --}}
{{ $users->total() }} gebruiker(s) gevonden
{{-- Mobile sort bar --}}
@foreach (request()->except(['sort', 'dir']) as $k => $v) @endforeach Sorteer: {{ $dir === 'asc' ? '↑' : '↓' }}
{{-- Mobile card list --}} {{-- Desktop table --}}
@forelse ($users as $user) @empty @endforelse
{!! $sortLink('id', 'ID') !!} {!! $sortLink('name', 'Gebruiker') !!} {!! $sortLink('profile_visibility_rank', '👁') !!} {!! $sortLink('profile_type', '🪪') !!} {!! $sortLink('profile_gender', '⚧') !!} {!! $sortLink('plan_rank', 'Plan') !!} {!! $sortLink('profile_completeness', 'Profiel') !!} {!! $sortLink('likes_count', $icoHeartOut) !!} {!! $sortLink('liked_by_count', $icoHeartFill) !!} {!! $sortLink('matches_count', $icoMatch) !!} {!! $sortLink('conversations_count', '') !!} Status {!! $sortLink('last_active_at', 'Laatste activiteit') !!} {!! $sortLink('created_at', 'Lid sinds') !!}
{{ $user->id }} @if ($user->primaryPhoto) @else
{{ mb_substr($user->name, 0, 1) }}
@endif

#{{ $user->id }} {{ $user->name }}

{{ $user->email }}

@if ($user->profile_is_visible === null) @elseif ($user->profile_is_visible && $user->profile_is_complete) @elseif ($user->profile_is_visible) @else @endif @php $typeMap = [ 'self' => ['👤', 'Zichzelf'], 'parent' => ['👶', 'Ouder (voor kind)'], 'partner' => ['💍', 'Partner'], 'pro' => ['💼', 'Zorgprofessional'], ]; [$typeIco, $typeLabel] = $typeMap[$user->profile_type ?? ''] ?? ['—', 'Geen profiel']; @endphp {{ $typeIco }} @php $genderMap = ['male' => ['♂', 'Man'], 'man' => ['♂', 'Man'], 'female' => ['♀', 'Vrouw'], 'woman' => ['♀', 'Vrouw'], 'other' => ['⚧', 'Anders']]; [$gIco, $gLabel] = $genderMap[$user->profile_gender ?? ''] ?? ['—', '']; @endphp {{ $gIco }} @php $isYearly = str_contains($user->subscription_plan ?? '', 'yearly'); @endphp @if ($user->isOrg()) 🏢 @elseif ($user->is_pro) 🏅 @elseif ($user->is_premium) 💎 @else 🌱 @endif @php $score = (int) ($user->profile_completeness ?? 0); $max = 11; $pct = round($score / $max * 100); $color = $score >= 9 ? '#22c55e' : ($score >= 6 ? '#f59e0b' : '#ef4444'); @endphp
{{ $score }}/{{ $max }}
{{ $user->likes_count }} {{ $user->liked_by_count }} {{ $user->matches_count ?? 0 }} {{ $user->conversations_count ?? 0 }} @if ($user->suspended_at) Geschorst @elseif ($user->email_verified_at) Actief @else Onbevestigd @endif @if ($user->last_active_at) {{ \Carbon\Carbon::parse($user->last_active_at)->diffForHumans() }} @else Nooit @endif {{ $user->created_at->format('d/m/Y') }}
Geen gebruikers gevonden.
{{-- end desktop table --}} @if ($users->hasPages())
{{ $users->links() }}
@endif @endsection