@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
{{ $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
- 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
@if($user->professional)
Freelance role
{{ \Illuminate\Support\Str::headline($user->professional->career_level) }}
- Display name
- {{ $user->professional->display_name }}
- Headline
- {{ $user->professional->headline ?: '—' }}
- Jobs completed
- {{ $user->professional->jobs_completed }}
- Completion rate
- {{ (float) $user->professional->completion_rate }}%
- Rating
- {{ number_format((float) $user->professional->rating_avg, 1) }}
- Service area
- {{ collect([$user->professional->service_city, $user->professional->service_state])->filter()->implode(', ') ?: '—' }}
@if($user->professional->skillLinks->isNotEmpty())
@foreach($user->professional->skillLinks as $link)
{{ $link->skill?->name ?? 'Skill' }}
@endforeach
@endif
@endif
Wallets & earnings
@if(Route::has('admin.wallets.index'))
All wallets
@endif
@forelse($user->wallets as $w)
{{ \Illuminate\Support\Str::headline($w->type) }}
Available {{ $money($w->available_balance, $w->currency === 'NGN' ? '₦' : ($w->currency.' ')) }} · Pending {{ $money($w->pending_balance, $w->currency === 'NGN' ? '₦' : ($w->currency.' ')) }}
@if(Route::has('admin.wallets.show'))
Open
@endif
@empty
No wallets yet.
@endforelse
@if($earningTransactions->isNotEmpty())
Recent credits
@foreach($earningTransactions as $tx)
{{ $money($tx->amount, $tx->currency === 'NGN' ? '₦' : ($tx->currency.' ')) }}
{{ $tx->description ?: ($tx->category ?: $tx->type) }} · {{ $tx->created_at?->format('d M Y') }}
{{ \Illuminate\Support\Str::headline($tx->status) }}
@endforeach
@endif
@php
$kycRecords = $user->kycVerifications
->sort(function ($a, $b) {
$pending = ['pending', 'submitted', 'in_review'];
$aPending = in_array($a->status, $pending, true) ? 1 : 0;
$bPending = in_array($b->status, $pending, true) ? 1 : 0;
if ($aPending !== $bPending) {
return $bPending <=> $aPending;
}
return ($b->created_at?->getTimestamp() ?? 0) <=> ($a->created_at?->getTimestamp() ?? 0);
})
->values();
$pendingKyc = $kycRecords->whereIn('status', ['pending', 'submitted', 'in_review']);
@endphp
KYC review
Review documents submitted by this user, then approve or reject.
L{{ $user->kyc_level }} · {{ $user->kycStatusLabel() }}
@if($pendingKyc->isNotEmpty())
{{ $pendingKyc->count() }} pending review
@endif
Submitted documents ({{ $kycRecords->count() }})
@forelse($kycRecords as $k)
@php
$files = $k->documentFiles();
$needsReview = in_array($k->status, ['pending', 'submitted', 'in_review'], true);
@endphp
L{{ $k->level }} · {{ \Illuminate\Support\Str::headline(str_replace('_', ' ', (string) ($k->document_type ?: 'document'))) }}
{{ $k->document_number ? \App\Modules\Api\Resources\KycVerificationResource::mask($k->document_number) : 'No number' }}
· {{ $k->created_at?->format('d M Y, H:i') }}
· {{ $k->provider ?: 'user submit' }}
@if($k->reviewed_at)
Reviewed {{ $k->reviewed_at->format('d M Y, H:i') }}@if($k->reviewer) · {{ $k->reviewer->name }}@endif
@endif
{{ \Illuminate\Support\Str::headline($k->status) }}
@if($files)
@endif
@if($k->admin_notes)
Notes: {{ $k->admin_notes }}
@endif
@if($k->failure_reason)
Reason: {{ $k->failure_reason }}
@endif
@empty
No KYC submissions from this user yet.
@endforelse
has('document_type') || $errors->has('document_number') || $errors->has('document_front') || $errors->has('document_back')) open @endif>
Manual ID upload (optional)
Use only when needed. Prefer reviewing documents the user submitted from the app.
@if($isFreelancer)
Projects & contracts
@if(Route::has('admin.jobs.index'))
All jobs
@endif
@if(Route::has('admin.contracts.index'))
Contracts
@endif
Active / assigned ({{ $stats['projects_active'] }})
@forelse($activeJobs as $job)
{{ $job->reference }} · {{ $job->title }}
{{ $job->employer?->name ?: 'Employer' }} · {{ $job->skill?->name }}
{{ \Illuminate\Support\Str::headline($job->status) }}
Open
@empty
No active projects.
@endforelse
Completed ({{ $stats['projects_done'] }})
@forelse($completedJobs as $job)
{{ $job->reference }} · {{ $job->title }}
{{ $job->employer?->name ?: 'Employer' }}
@empty
No completed projects yet.
@endforelse
@if($contracts->isNotEmpty())
Contracts
| Reference | Job | Amount | Status | |
@foreach($contracts as $contract)
| {{ $contract->reference }} |
{{ $contract->workJob?->reference ?: '—' }} |
{{ $money($contract->total_amount, ($contract->currency === 'NGN' ? '₦' : ($contract->currency.' '))) }} |
{{ \Illuminate\Support\Str::headline($contract->status) }} |
@if(Route::has('admin.contracts.show'))
View
@endif
|
@endforeach
@endif
| Job | Amount | Days | Status | |
@forelse($bids as $bid)
|
{{ $bid->workJob?->reference ?: '—' }}
{{ \Illuminate\Support\Str::limit($bid->workJob?->title, 40) }}
|
{{ $money($bid->amount, ($bid->currency === 'NGN' ? '₦' : ($bid->currency.' '))) }} |
{{ $bid->timeframe_days ?? '—' }} |
{{ \Illuminate\Support\Str::headline($bid->status) }} |
@if(Route::has('admin.job-bids.show'))
View
@endif
@if($bid->workJob)
Job
@endif
|
@empty
| No bids yet. |
@endforelse
@endif
@if($isEmployer)
| Reference | Title | Assigned | Status | |
@forelse($postedJobs as $job)
| {{ $job->reference }} |
{{ $job->title }} |
{{ $job->assignedProfessional?->display_name ?: '—' }} |
{{ \Illuminate\Support\Str::headline($job->status) }} |
Open |
@empty
| No jobs posted. |
@endforelse
@endif
@forelse($reviews as $review)
{{ number_format((float) $review->overall, 1) }}★
from {{ $review->reviewer?->name ?: 'User' }}
{{ $review->workJob?->reference }} · {{ \Illuminate\Support\Str::limit($review->comment, 80) ?: 'No comment' }}
{{ $review->is_visible ? 'Visible' : 'Hidden' }}
Open
@empty
No reviews yet.
@endforelse
Requested / held{{ $money($stats['withdrawal_requested']) }}
Paid out{{ $money($stats['withdrawal_paid']) }}
Requests{{ $stats['payouts_count'] }}
@forelse($payouts as $payout)
{{ $payout->reference }} · {{ $money($payout->amount, ($payout->currency === 'NGN' ? '₦' : ($payout->currency.' '))) }}
{{ $payout->bank_name ?: 'Bank' }} · {{ $payout->created_at?->format('d M Y') }}
{{ \Illuminate\Support\Str::headline($payout->status) }}
@if(Route::has('admin.payouts.show'))
Manage
@endif
@empty
No withdrawal requests.
@endforelse
@endsection
@push('scripts')
@endpush