@extends('admin::layouts.layout') @section('content')

User Management

Manage user accounts, roles, permissions and authentication

@php $statusMap = [ 'inquiry' => ['label' => 'Inquiry', 'color' => ''], 'qualification'=> ['label' => 'Qualification', 'color' => '#155dfc'], 'invited' => ['label' => 'Invited', 'color' => '#a733fb'], 'onboarding' => ['label' => 'Onboarding', 'color' => '#863e00'], 'kyc_pending' => ['label' => 'KYC Pending', 'color' => '#a18000'], 'active' => ['label' => 'Active', 'color' => '#178150'], 'suspended' => ['label' => 'Suspended', 'color' => '#d62a11'], ]; @endphp @foreach($statusMap as $key => $info)
{{ $counts[$key] ?? 0 }}

{{ $info['label'] }}

@endforeach
@forelse($clients as $client) @php $profile = $client->clientProfile; $status = $profile->status ?? 'N/A'; $kycStatus = $profile->kyc_status ?? 'not_started'; $totalSteps = $client->total_onboarding_steps ?? 0; $completedSteps = $client->completed_onboarding_steps ?? 0; $progress = $totalSteps > 0 ? round(($completedSteps / $totalSteps) * 100) : 0; $serviceType = $client->engagements->first()->service_type ?? '—'; if ($client->engagements->count() > 1) { $serviceType = 'Multiple'; } $engagementCount = $client->engagements_count ?? 0; $totalValue = $client->engagements->sum('total_value') ?? 0; $totalValueFormatted = $totalValue ? 'R ' . number_format($totalValue / 1000000, 1) . 'M' : '—'; $kycLabel = ucfirst(str_replace('_', ' ', $kycStatus)); $kycClass = match($kycStatus) { 'approved' => 'text-success', 'pending' => 'text-danger', default => 'text-secondary', }; $badgeClass = match($status) { 'active' => 'new-badge01', 'suspended' => 'new-badge06', 'invited' => 'new-badge02', 'onboarding' => 'new-badge03', 'kyc_pending' => 'new-badge04', 'qualification'=> 'new-badge', default => 'new-badge', }; @endphp @empty @endforelse
Client Service Type Engagements KYC Onboarding Status

{{ strtoupper(substr($client->name, 0, 1)) }}

{{ $client->name }}

{{ $profile->company_name ?? '' }} · {{ $profile->city ?? '' }}, {{ $profile->country ?? '' }}
{{ $serviceType }}

{{ $engagementCount }}

{{ $totalValueFormatted }}
{{ $kycLabel }}
Onboarding{{ $completedSteps }}/{{ $totalSteps }}
{{ ucfirst(str_replace('_', ' ', $status)) }}
No clients found.
@endsection @push('scripts') @endpush @push('styles') @endpush