@extends('backend.layout.master-tailwind') @section('title', __('Clients')) @section('content') @php $hues = [120, 260, 280, 220, 30, 180, 300, 60, 200, 340]; $tabs = [ 'all' => ['label' => __('All'), 'count' => $countAll], 'pending' => ['label' => __('Needs review'), 'count' => $countPending], ]; @endphp
{{-- Page head --}}

{{ __('Clients') }}

{{ number_format($countAll) }} {{ __('total') }} · {{ number_format($countPending) }} {{ __('awaiting verification') }} @if($flaggedWeek > 0)· {{ $flaggedWeek }} {{ __('suspended this week') }}@endif

{{-- Notice board --}}
{{ __('Suspended clients will complete their active orders but cannot place new ones.') }}
{{ __('Deactivating an account hides all associated jobs from public view until reactivated.') }}
{{ __('Identity verification confirms the client\'s identity via legal documents.') }}
{{ __('Individual commission settings allow assigning a unique commission rate per client.') }}
{{-- Tabs --}}
@foreach($tabs as $key => $tab) {{ $tab['label'] }} {{ number_format($tab['count']) }} @endforeach
{{-- Toolbar --}}
{{-- Table --}}
@forelse($users as $user) @php $hue = $hues[$user->id % count($hues)]; $fn = $user->first_name ?? ''; $ln = $user->last_name ?? ''; $initials = strtoupper(substr($fn, 0, 1) . substr($ln, 0, 1)) ?: 'C'; $name = trim($fn . ' ' . $ln) ?: ($user->username ?? '—'); if ($user->is_suspend) { $stClass = 'danger'; $stLabel = __('Suspended'); $stKey = 'suspended'; } elseif ($user->user_verified_status) { $stClass = 'success'; $stLabel = __('Verified'); $stKey = 'verified'; } else { $stClass = 'warn'; $stLabel = __('Pending'); $stKey = 'pending'; } $rating = $user->avg_rating > 0 ? number_format((float)$user->avg_rating, 1) : null; @endphp @empty @endforelse
{{ __('Client') }} {{ __('Status') }} {{ __('Country') }} {{ __('Orders') }} {{ __('Total Spend') }} {{ __('Rating') }} {{ __('Joined') }}
{{ __('No clients found.') }}
{{-- Pagination --}} @include('backend.layout.partials.paginator', ['paginator' => $users, 'label' => __('clients')])
{{-- /card --}}
@endsection @section('script') @endsection