@extends('layouts.app') @section('title', 'Interacciones del Cliente - Call Center') @section('content')

Interacciones del Cliente: {{ $client->business_name }}

Historial completo de interacciones con este cliente

Nueva Interacción Volver
Información del Cliente

Nombre:

{{ $client->business_name }}

Teléfono:

{{ $client->phone ?? 'N/A' }}

Email:

{{ $client->email ?? 'N/A' }}

Vendedor:

@if($client->salesman) {{ $client->salesman->first_name }} {{ $client->salesman->last_name }} @else Sin asignar @endif

Historial de Interacciones ({{ $logs->total() }})
@if($logs->count() > 0)
@foreach($logs as $log) @endforeach
Fecha Tipo Agente Notas Estado Seguimiento Resultado Pago Programado Acciones
{{ $log->created_at->format('d/m/Y') }}
{{ $log->created_at->format('H:i') }}
@php $typeColors = [ 'Llamada' => 'primary', 'Email' => 'info', 'Visita' => 'warning', 'Mensaje' => 'success', 'Reunión' => 'secondary', ]; $color = $typeColors[$log->interaction_type] ?? 'secondary'; @endphp {{ $log->interaction_type }} @if($log->duration)
{{ $log->duration }} @endif
{{ $log->user->name ?? 'N/A' }}

{{ \Illuminate\Support\Str::limit($log->notes, 50) }}

@php $statusColors = [ 'Completado' => 'success', 'No Contesta' => 'warning', 'Seguimiento' => 'info', 'Pendiente' => 'secondary', 'Rechazado' => 'danger', ]; $statusColor = $statusColors[$log->status] ?? 'secondary'; @endphp {{ $log->status }} @if($log->follow_up_date) @php $followUpDate = \Carbon\Carbon::parse($log->follow_up_date); $isPast = $followUpDate->isPast(); $isToday = $followUpDate->isToday(); @endphp {{ $followUpDate->format('d/m/Y H:i') }} @else - @endif @if($log->outcome) {{ $log->outcome }} @else - @endif @if($log->outcome === 'Pago Programado' && $log->scheduled_payment_date) @php $paymentDate = \Carbon\Carbon::parse($log->scheduled_payment_date); $isPast = $paymentDate->isPast(); $isToday = $paymentDate->isToday(); @endphp {{ $paymentDate->format('d/m/Y') }} @else - @endif
{{ $logs->links() }}
@else

No hay interacciones registradas para este cliente

Comienza registrando la primera interacción.

Nueva Interacción
@endif
@endsection