@extends('setting.nav') @section('title', 'Auto Reply Entry') @section('content')
@include('auto_reply._tabs') @php $isAdmin = auth()->check() && auth()->user()->auth_id == 0; $retryable = in_array($log->status, [ \App\Models\AutoReplyLog::STATUS_FAILED, \App\Models\AutoReplyLog::STATUS_PENDING, ], true); @endphp
Back to the log {{ $log->status }} @if ($isAdmin && $retryable)
@csrf
@endif
@if ($log->error_reason)
Why: {{ $log->error_reason }}
@endif
Decision
Incoming mail
{{ $log->message_ref }}
Message row
{{ $log->message_id ?: '—' }}
Thread
{{ $log->thread_id ?: '—' }}
Category
{{ $category->name ?? '—' }} @if ($log->category_code)
{{ $log->category_code }}
@endif
AI confidence
{{ $log->ai_confidence === null ? '—' : number_format($log->ai_confidence, 2) }}
Template
@if ($template) {{ $template->name }} @else — @endif
Recipient
{{ $log->recipient_name ? $log->recipient_name . ' <' . $log->recipient_email . '>' : ($log->recipient_email ?: '—') }}
Sent at
{{ $log->sent_at ? $log->sent_at->format('d M Y, H:i:s') : '—' }}
Provider id
{{ $log->provider_message_id ?: '—' }}
Attempts
{{ $log->attempts }}
Acknowledgement
@if ($log->subject || $log->body)
Subject: {{ $log->subject }}

{{-- Admin-authored template output; shown as it was sent. --}}
{!! $log->body !!}
@else

Nothing was rendered — the decision was made before a template was reached.

@endif
@if ($log->ai_raw_response)
Raw AI response
{{ $log->ai_raw_response }}
@endif
@endsection