@extends('admin/layouts/admin') @section('title', __($translatePrefix . '.show.title', ['name' => $item->username])) @section('scripts') @endsection @section('content') @include('admin/shared/alerts')

{{ __($translatePrefix . '.show.title', ['name' => $item->username]) }}

{{ __($translatePrefix . '.show.subheading', ['date' => $item->created_at != null ? $item->created_at->format('d/m/y') : 'None']) }}

@csrf @method('PUT')
@include('admin/shared/input', [ 'name' => 'username', 'label' => __('global.username'), 'value' => old('username', $item->username), ])
@include('admin/shared/input', [ 'name' => 'firstname', 'label' => __('global.firstname'), 'value' => old('firstname', $item->firstname), ])
@include('admin/shared/input', [ 'name' => 'lastname', 'label' => __('global.lastname'), 'value' => old('lastname', $item->lastname), ])
@include('admin/shared/input', [ 'name' => 'email', 'label' => __('global.email'), 'value' => old('email', $item->email), 'type' => 'email', ]) @include('admin/shared/select', [ 'name' => 'locale', 'label' => __('global.locale'), 'options' => $locales, 'value' => old('locale', $item->locale), ])
@include('admin/shared/textarea', [ 'name' => 'signature', 'label' => __('admin.admins.signature'), 'value' => old('signature', $item->signature), ])

{{ __('client.profile.security.title') }}

{{ __('client.profile.security.subheading') }}

@csrf @method('PUT')
@include('admin/shared/password', [ 'name' => 'current_password', 'label' => __('client.profile.security.currentpassword'), 'required' => true, ])
@include('admin/shared/password', [ 'name' => 'password', 'label' => __('client.profile.security.newpassword'), 'required' => true, ])
@include('admin/shared/password', [ 'name' => 'password_confirmation', 'label' => __('client.profile.security.newpassword_confirmation'), 'required' => true, ])
@if ($item->hasSecurityQuestion())
@include('admin/shared/input', [ 'name' => 'security_answer', 'label' => $item->securityQuestion->getTranslatedQuestion(), 'help' => __('client.profile.security_question.answer_help'), 'required' => true, ])
@endif

{{ __($translatePrefix . '.show.login') }}

@include('admin/core/actionslog/usertable', ['logs' => $logs])

{{ __($translatePrefix . '.show.details') }}

@include('admin/shared/input', [ 'name' => 'last_ip', 'label' => __('admin.customers.show.last_ip'), 'value' => old('last_ip', $item->last_login_ip), 'disabled' => true, ])
@include('admin/shared/input', [ 'name' => 'last_login', 'label' => __('admin.customers.show.last_login'), 'value' => old('last_login', $item->last_login), 'disabled' => true, ])

{{ __('client.profile.2fa.title') }}

@if (!auth('admin')->user()->twoFactorEnabled())

{{ __('client.profile.2fa.info') }}

@else

{!! __('client.profile.2fa.download_codes', ['url' => route('admin.profile.2fa_codes')]) !!}

@endif
@csrf @if (!auth('admin')->user()->twoFactorEnabled()) {!! $qrcode !!} @include('shared/input', [ 'name' => '2fa', 'label' => __('client.profile.2fa.code'), 'help' => $code, ]) @else @include('shared/input', [ 'name' => '2fa', 'label' => __('client.profile.2fa.code'), ]) @endif
@csrf @include('shared/checkbox', [ 'name' => '2fa_email_new_ip', 'label' => __('client.profile.2fa.email_new_ip'), 'checked' => auth('admin')->user()->twoFactorEmailOnNewIpEnabled(), ])
@php $trustedDevices = auth('admin')->user()->twoFactorTrustedIps(); $currentIp = request()->ip(); @endphp

{{ __('client.profile.2fa.trusted_devices_heading') }}

@if (count($trustedDevices) > 0)
@csrf
@endif

{{ __('client.profile.2fa.trusted_devices_description') }}

@if (count($trustedDevices) === 0)

{{ __('client.profile.2fa.trusted_devices_empty') }}

@else
    @foreach ($trustedDevices as $device)
  • {{ \App\Support\UserAgentLabel::summarize($device['user_agent']) }} @if ($device['ip'] === $currentIp) {{ __('client.profile.2fa.current_device') }} @endif

    {{ $device['ip'] }} · @if ($device['until']) {{ __('client.profile.2fa.trusted_device_expires_at', ['date' => $device['until']]) }} @else {{ __('client.profile.2fa.trusted_device_expires_never') }} @endif

    @csrf
  • @endforeach
@endif
@if ($securityQuestionsEnabled)

{{ __('client.profile.security_question.title') }}

@if ($item->hasSecurityQuestion())

{{ __('client.profile.security_question.current') }}: {{ $item->securityQuestion?->getTranslatedQuestion() }}

@else
@csrf @include('admin/shared/select', [ 'name' => 'security_question_id', 'label' => __('client.profile.security_question.select'), 'options' => $securityQuestions, 'value' => old('security_question_id', $item->security_question_id), 'placeholder' => __('client.profile.security_question.choose'), ]) @include('admin/shared/input', [ 'name' => 'security_answer', 'label' => __('client.profile.security_question.answer'), 'help' => __('client.profile.security_question.answer_help'), ]) @include('shared/password', [ 'name' => 'currentpassword_sq', 'label' => __('client.profile.security.currentpassword'), ])
@endif @endif @if ($item->role->is_admin)

{{ __('permissions.staff_permissions') }}

{{ $item->role->name }}

@endif @if ($item->role->permissions->count() > 0)

{{ __('permissions.staff_permissions') }}

@foreach ($item->role->permissions->chunk(3) as $row)
    @foreach ($row as $permission)
  • {{ $permission->translate() }}
  • @endforeach
@endforeach
@endif
@if (staff_has_permission('admin.show_metadata')) @endif
@include('admin/metadata/overlay', ['item' => $item]) @endsection