@extends('client.layouts.dashboard') @section('title', 'User Details') @section('styles') @endsection @section('content')
Back to Users
{{ strtoupper(substr($user->name, 0, 1)) }}
{{ $user->name }}

{{ $user->email }}

@if($user->approval_status === 'pending') Pending Approval @elseif($user->approval_status === 'approved') Approved @else Rejected @endif @if($user->is_active) Active @else Inactive @endif
Phone
{{ $user->phone ?? '-' }}
SMS Service
@if($user->sms_service_enabled) Enabled @else Disabled @endif
WhatsApp Service
@if($user->settings && $user->settings->whatsapp_enabled) Enabled @else Disabled @endif
Preferred Channel
{{ ucfirst($user->settings->preferred_channel ?? 'sms') }}
Joined
{{ $user->created_at->format('M d, Y') }}
Last Active
{{ $user->last_active_at ? $user->last_active_at->diffForHumans() : 'Never' }}
@if($user->approval_status === 'rejected' && $user->rejection_reason)
Rejection Reason

{{ $user->rejection_reason }}

@endif
{{ $stats['total_sms'] }}
Total SMS
{{ $stats['total_whatsapp'] }}
WhatsApp
{{ $stats['total_calls'] }}
Total Calls
{{ $stats['active_days'] }}
Active Days
Recent Message Logs
@forelse($recentSms as $sms) @empty @endforelse
Phone Channel Type Status Time
{{ $sms->phone_number }} @if($sms->channel === 'whatsapp') WA @else SMS @endif @if($sms->sms_type === 'auto_reply') Auto Reply @elseif($sms->sms_type === 'promotion') Promotion @else {{ ucfirst(str_replace('_', ' ', $sms->sms_type ?? 'unknown')) }} @endif @if($sms->status === 'sent') Sent @elseif($sms->status === 'pending') Pending @else Failed @endif {{ $sms->created_at->diffForHumans() }}
No message logs yet
Recent Call Logs
@forelse($recentCalls as $call) @empty @endforelse
Phone Type Duration Time
{{ $call->phone_number }} @if($call->call_type === 'incoming') Incoming @elseif($call->call_type === 'outgoing') Outgoing @else Missed @endif {{ $call->duration ? gmdate('i:s', $call->duration) : '-' }} {{ $call->created_at->diffForHumans() }}
No call logs yet
@endsection