@extends('admin.layouts.admin') @section('title', $user->name) @section('content')
← Usuarios
{{ $user->name }}

{{ $user->email }}

Información
Plan {{ ucfirst($user->plan) }}
Estado {{ $user->status === 'active' ? 'Activo' : 'Inactivo' }}
Rol {{ $user->role }}
Registro {{ $user->created_at->format('d/m/Y') }}
Logins {{ $loginCount }}
@if($loginLogs->isNotEmpty())
Último acceso {{ $loginLogs->first()->logged_in_at->format('d/m/Y H:i') }}
Dispositivo {{ $loginLogs->first()->device ?? '—' }}
@endif
Lotes {{ $user->batches->count() }}
@if($user->socialProviders->count() > 0)
Auth @foreach($user->socialProviders as $provider) {{ ucfirst($provider->provider) }} @endforeach
@endif
Cambiar plan
@csrf @method('PUT')
Lotes
@forelse($user->batches as $batch)
{{ strtoupper(substr($batch->guide->name, 0, 1)) }}
{{ $batch->name }}
{{ $batch->guide->name }} — {{ $batch->start_date->format('d/m/Y') }}
{{ __('batches.status.' . $batch->status) }}
@empty
Sin lotes
@endforelse
@if($loginLogs->isNotEmpty())
Historial de accesos (últimos {{ $loginLogs->count() }})
@foreach($loginLogs as $log) @endforeach
Fecha y hora Dispositivo Origen IP User-Agent
{{ $log->logged_in_at->format('d/m/Y H:i') }} @php $deviceIcons = ['mobile' => '📱', 'tablet' => '⬜', 'desktop' => '🖥️']; @endphp {{ $deviceIcons[$log->device] ?? '' }} {{ $log->device ?? '—' }} {{ $log->login_source }} {{ $log->ip_address ?? '—' }} {{ $log->user_agent ? \Illuminate\Support\Str::limit($log->user_agent, 40) : '—' }}
@endif @endsection