{{-- User Info Panel --}}
{{ $user->initials }}
@if($user->suspended_at) {{ __('Suspended') }} @elseif($user->status === 'active') {{ __('Active') }} @elseif($user->status === 'pending_deletion') {{ __('Pending Deletion') }} @elseif($user->status === 'banned') {{ __('Banned') }} @else {{ ucfirst($user->status) }} @endif @if($user->is_admin) {{ __('Admin') }} @endif

{{ $user->email }}

{{ __('Joined') }} {{ $user->created_at->format('M j, Y') }} @if($user->email_verified_at) · {{ __('Email verified') }} {{ $user->email_verified_at->format('M j, Y') }} @else · {{ __('Email not verified') }} @endif

@csrf
@if($user->suspended_at)
@csrf
@else
@csrf
@endif
{{-- Subscription Info --}}

{{ __('Subscription') }}

@if($user->activeWorkspace?->subscription?->plan) @php $subscription = $user->activeWorkspace->subscription; $plan = $subscription->plan; @endphp

{{ $plan->name }} {{ __('Plan') }}

@currency($plan->monthly_price){{ __('/month') }}

{{ ucfirst($subscription->status) }}
@else

{{ __('No Active Subscription') }}

{{ __('This user does not have an active plan.') }}

{{ __('None') }}
@endif
{{-- Workspaces --}}

{{ __('Workspaces') }}

@forelse($workspaces as $ws)
{{ strtoupper(substr($ws->name, 0, 2)) }}

{{ $ws->name }}

{{ $ws->contacts_count ?? 0 }} {{ __('contacts') }} · {{ $ws->conversations_count ?? 0 }} {{ __('conversations') }}

{{ ucfirst($ws->pivot->role) }}
@empty

{{ __('No workspaces found.') }}

@endforelse
{{-- Recent Login Activity --}}

{{ __('Recent Login Activity') }}

@forelse($loginHistory as $index => $log) @empty @endforelse
{{ __('IP Address') }} {{ __('User Agent') }} {{ __('Date') }}
{{ $log->ip_address ?? __('N/A') }} @if($index === 0) {{ __('Latest') }} @endif {{ Str::limit($log->user_agent ?? __('N/A'), 40) }} {{ \Carbon\Carbon::parse($log->created_at)->format('M j, Y g:i A') }}
{{ __('No login activity recorded.') }}
{{-- Recent Payments --}}

{{ __('Recent Payments') }}

@forelse($payments as $payment) @empty @endforelse
{{ __('Amount') }} {{ __('Status') }} {{ __('Date') }}
@currency($payment->amount) @if($payment->status === 'succeeded') {{ __('Succeeded') }} @elseif($payment->status === 'failed') {{ __('Failed') }} @elseif($payment->status === 'refunded') {{ __('Refunded') }} @elseif($payment->status === 'pending') {{ __('Pending') }} @else {{ ucfirst($payment->status) }} @endif {{ \Carbon\Carbon::parse($payment->created_at)->format('M j, Y') }}
{{ __('No payments recorded.') }}