@extends('layouts.admin') @section('breadcrumb')
@endsection @section('content')

En esta página podrá revisar su actividad histórica en la plataforma

(*) La fecha desplegada corresponde a la hora de Chile continental.

{!! html()->form('GET', '/admin/acciones') ->class('form-horizontal') ->name('form-acciones') ->open() !!} @if (\Auth::user()->root || \Auth::user()->hasRol('admin'))
{!! html()->label('Acción', 'acciones')->class('form-label') !!}
{!! html()->select('action') ->options([null => 'Seleccione acción'] + ($actions_search ?? [])) ->value($action ?? '') ->class('form-select') ->id('action') !!}
@endif
{!! html()->submit('Buscar')->class('btn btn-outline-primary me-2') !!} Limpiar
{!! html()->form()->close() !!}
@forelse (($logs ?? []) as $log) @php if (($log->tipo ?? '') == 'representado') { $link = url('admin/representado/' . ($log->objeto_id ?? 0) . '/edit'); } elseif ( ($log->tipo ?? '') == 'solicitud_audiencia' && (($actions[$log->accion] ?? '') !== '') && (($actions[$log->accion] ?? '') != 'Descargó reporte de ') ) { $link = url('admin/solicitudes/' . ($log->objeto_id ?? 0)); } elseif (($log->tipo ?? '') == 'usuario') { $link = url('admin/usuarios/' . ($log->objeto_id ?? 0) . '/edit'); } else { $link = false; } @endphp @if ($link) @else @endif @empty @endforelse
Usuario Acción Fecha (*)
@if (!empty($log->delegado_id)) {{ optional($log->delegado)->displayName() ?? 'Usuario no disponible' }}
(representando a {{ optional($log->usuario)->displayName() ?? 'Usuario no disponible' }} ) @else {{ optional($log->usuario)->displayName() ?? 'Usuario no disponible' }} @endif
{{ $actions[$log->accion] ?? ($log->accion ?? '') }} @if (($log->accion ?? '') !== 'login') {{ $labels[$log->tipo] ?? ($log->tipo ?? '') }} @endif @if (!is_null($log->detalle_objeto ?? null)) ({{ $log->texto_detalle ?? '' }}) @endif {{-- Acción principal --}}
{{ $actions[$log->accion] ?? ($log->accion ?? '') }}
@if (($log->accion ?? '') !== 'login') @if (($log->accion ?? '') === 'send_email') @php $info = json_decode($log->antes ?? '{}'); $info = is_object($info) ? $info : (object)[]; $decodedContenido = base64_decode($info->contenido ?? '', true); @endphp
Destinatario:
{{ $info->destinatario ?? '' }}
Id mensaje:
{{ $info->mensaje_id ?? '' }}
Asunto:
{{ $info->asunto ?? '' }}
Contenido:
{!! $decodedContenido !== false ? $decodedContenido : '' !!}
@elseif (($log->accion ?? '') === 'fuera_oficina')
{{ $labels[$log->tipo] ?? ($log->tipo ?? '') }} (pertenencia id {{ $log->objeto_id ?? '' }})
@else
{{ $labels[$log->tipo] ?? ($log->tipo ?? '') }}
@endif @if (!is_null($log->detalle_objeto ?? null)) ({{ $log->texto_detalle ?? '' }}) @endif @endif
{{ Helpers::horaChile($log->created_at, 'd/m/Y H:i') }}
No se encontraron registros de actividad.
@if(isset($logs)) {{ $logs->appends(\Request::query())->links() }} @endif
@endsection