@if ($complaint->assistantSession) @php $chatSession = $complaint->assistantSession; $chatSession->loadMissing(['messages.media', 'assignee', 'locker']); $canChat = auth()->user()?->can(\App\Models\Permission::COMPLAINTS_VIEW); @endphp

{{ __('admin.assistant_transcript') }}

{{ __('admin.via_assistant') }}

@if ($canChat)
{{ __('admin.chat_taken') }}

@endif @if ($chatSession->transitions->isNotEmpty())
{{ __('admin.assistant_transitions') }} {{ trans_choice('admin.assistant_transitions_count', $chatSession->transitions->count(), ['count' => $chatSession->transitions->count()]) }}
    @foreach ($chatSession->transitions as $index => $t) @php $from = (string) ($t->from_state ?: '—'); $to = (string) ($t->to_state ?: '—'); $reason = trim((string) ($t->reason ?: '')); $duration = $t->duration_ms !== null ? (int) $t->duration_ms : null; $at = $t->created_at ? $t->created_at->timezone(config('app.timezone'))->format('Y-m-d H:i:s') : null; @endphp
  1. {{ $from }} {{ $to }}
    @if ($reason !== '') {{ $reason }} @endif @if ($duration !== null) {{ __('admin.assistant_transition_duration', ['ms' => $duration]) }} @endif @if ($at) @endif
  2. @endforeach
@endif
@endif