@php($visitor = $conversation->visitor?->fresh()) @php($online = $visitor?->isOnline() ?? false)
@if($online) @else @if($visitor?->last_seen_at) {{ $visitor->last_seen_at->diffForHumans() }} @endif @endif
@if($conversation->lead_id) @else @can('create', \VentureDrake\LaravelCrm\Models\Lead::class) @endcan @endif @if($conversation->status !== 'closed') @endif
{{-- LEFT: chat (2/3) --}}
@forelse($messages as $m) @if($m->sender_type === 'system')
{{ $m->body }}
@else
{{ $m->senderName() }} • {{ $m->created_at->diffForHumans() }}
{{ $m->body }}
@endif @empty
{{ ucfirst(__('laravel-crm::lang.no_messages_yet')) }}
@endforelse
@can('reply', $conversation) @if($conversation->status !== 'closed')
@endif @endcan
{{-- RIGHT: visitor info + page-view history (1/3) --}}
{{ ucfirst(__('laravel-crm::lang.name')) }}
{{ $visitor?->name ?: '—' }}
{{ ucfirst(__('laravel-crm::lang.email')) }}
{{ $visitor?->email ?: '—' }}
IP
{{ $visitor?->ip_address ?: '—' }}
{{ ucfirst(__('laravel-crm::lang.last_active')) }}
{{ $visitor?->last_seen_at?->diffForHumans() ?: '—' }}
@if($conversation->lead_id)
{{ ucfirst(__('laravel-crm::lang.lead')) }}
{{ $conversation->lead->lead_id ?? $conversation->lead->title }}
@endif
@if($pageViews->isEmpty() && $pageViewPage === 1)
{{ ucfirst(__('laravel-crm::lang.no_pages_viewed')) }}
@else
    @foreach($pageViews as $v)
  • {{ $v->title ?: '(untitled)' }}
    {{ $v->url }}
    {{ $v->viewed_at->diffForHumans() }}
  • @endforeach
{{-- Pagination --}} @if($pageViewTotal > 1)
{{ $pageViewPage }} / {{ $pageViewTotal }}
@endif @endif