@extends('admin.layouts.app') @section('title',$user->name) @section('page-title',$user->name) @section('page-subtitle', \Illuminate\Support\Str::headline($user->account_type).' · '.$user->email) @section('content') @php $isFreelancer = (bool) $user->professional || $user->account_type === 'professional'; $isEmployer = in_array($user->account_type, ['employer', 'agency', 'enterprise'], true) || $postedJobs->isNotEmpty(); $money = fn ($amount, $currency = '₦') => $currency.number_format((float) $amount, 2); $tabs = [ ['id' => 'profile', 'label' => 'Profile'], ]; if ($user->professional) { $tabs[] = ['id' => 'freelance', 'label' => 'Freelance role']; } $tabs[] = ['id' => 'wallets', 'label' => 'Wallets & earnings', 'count' => $user->wallets->count()]; $pendingKycCount = $user->kycVerifications->whereIn('status', ['pending', 'submitted', 'in_review'])->count(); $tabs[] = ['id' => 'kyc', 'label' => 'KYC', 'count' => $pendingKycCount > 0 ? $pendingKycCount : $user->kycVerifications->count()]; if ($isFreelancer) { $tabs[] = ['id' => 'projects', 'label' => 'Projects', 'count' => $stats['projects_done'] + $stats['projects_active']]; $tabs[] = ['id' => 'bids', 'label' => 'Bids', 'count' => $stats['bids_count']]; } if ($isEmployer) { $tabs[] = ['id' => 'jobs', 'label' => 'Jobs posted', 'count' => $stats['posted_jobs']]; } $tabs[] = ['id' => 'reviews', 'label' => 'Reviews', 'count' => $stats['reviews_count']]; $tabs[] = ['id' => 'withdrawals', 'label' => 'Withdrawals', 'count' => $stats['payouts_count']]; @endphp
@include('admin.partials.icon', ['name' => 'edit']) Edit profile
@csrf @method('DELETE')
@include('admin.partials.icon', ['name' => 'back']) Back to users
{{ $isFreelancer ? 'Projects done' : 'Jobs posted' }}
{{ number_format($isFreelancer ? $stats['projects_done'] : $stats['posted_jobs']) }}
{{ $isFreelancer ? 'Money earned' : 'Wallet balance' }}
{{ $money($isFreelancer ? $stats['earned'] : $stats['wallet_available']) }}
Reviews
{{ number_format($stats['reviews_avg'], 1) }} / {{ $stats['reviews_count'] }}
{{ $isFreelancer ? 'Bids' : 'Active jobs' }}
{{ number_format($isFreelancer ? $stats['bids_count'] : $stats['projects_active']) }}
Withdrawal requested
{{ $money($stats['withdrawal_requested']) }}
@foreach($tabs as $index => $tab) @endforeach

Profile

Edit
Account type
{{ \Illuminate\Support\Str::headline($user->account_type) }}
Phone
{{ $user->phone ?: '—' }}
Country
{{ $user->country_code ?: '—' }}
KYC level
L{{ $user->kyc_level }} · {{ $user->kycStatusLabel() }}
Trust score
{{ $user->trust_score }}
Status
{{ ucfirst($user->status) }}
City
{{ $user->profile?->city ?: ($user->profile?->address_line ?: '—') }}
@if($user->professional)
Freelance ID
{{ $user->professional->jobnixy_id }}
Career level
{{ \Illuminate\Support\Str::headline($user->professional->career_level) }}
Availability
{{ \Illuminate\Support\Str::headline($user->professional->availability) }}
@endif
@csrf @method('PATCH')
@if($user->professional) @endif @if($isFreelancer) @endif @if($isEmployer) @endif
@endsection @push('scripts') @endpush