@extends('layouts.app') @push('styles') @endpush @section('content')

Conversation with {{ $conversation->customer_username ?? $conversation->customer_name ?? 'User' }}

{{ $conversation->customer_name }} | Messenger: {{ $conversation->messenger->name }}
Back to Conversations
@foreach($conversation->messages as $message) @if($message->sender_type == 'system')
{{ $message->content }} {{ $message->created_at->format('H:i') }}
@else
{{ $message->sender_type == 'customer' ? ($conversation->customer_username ?? $conversation->customer_name) : ($message->user ? $message->user->name : 'System') }} {{ $message->created_at->format('H:i') }}
{{ $message->content }}
@if($message->sender_type == 'operator' && !$message->is_sent) ⚠️ Not sent @endif
@endif @endforeach
Conversation Details
DIALOG STATUS
@if($conversation->dialogStatus) {{ $conversation->dialogStatus->name }} @else No status @endif
Customer

Name: {{ $conversation->customer_name ?? 'N/A' }}

Username: {{ $conversation->customer_username ?? 'N/A' }}

ID: {{ $conversation->external_id }}

Channel

{{ $conversation->messenger->name }}

{{ ucfirst($conversation->messenger->type) }}

@if($conversation->assignedUser)
Assigned To

{{ $conversation->assignedUser->name }}

@endif @if($conversation->group)
Group

{{ $conversation->group->name }}

@endif
Timeline

Created: {{ $conversation->created_at->format('M d, Y H:i') }}

Last message: {{ $conversation->last_message_at ? $conversation->last_message_at->format('M d, Y H:i') : 'N/A' }}

@endsection @push('scripts') @endpush