@extends('layouts.app') @section('title', 'Ver Interacción - Call Center') @section('content')

Detalles de la Interacción

Información completa de la interacción

Editar Volver
Información de la Interacción

Cliente:

{{ $log->client->business_name ?? 'N/A' }}

Tipo de Interacción:

@php $typeColors = [ 'Llamada' => 'primary', 'Email' => 'info', 'Visita' => 'warning', 'Mensaje' => 'success', 'Reunión' => 'secondary', ]; $color = $typeColors[$log->interaction_type] ?? 'secondary'; @endphp

{{ $log->interaction_type }}

Estado:

@php $statusColors = [ 'Completado' => 'success', 'No Contesta' => 'warning', 'Seguimiento' => 'info', 'Pendiente' => 'secondary', 'Rechazado' => 'danger', ]; $statusColor = $statusColors[$log->status] ?? 'secondary'; @endphp

{{ $log->status }}

Agente:

{{ $log->user->name ?? 'N/A' }}

Fecha de Creación:

{{ $log->created_at->format('d/m/Y H:i') }}

Duración:

{{ $log->duration ?? 'N/A' }}

@if($log->follow_up_date)

Fecha de Seguimiento:

@php $followUpDate = \Carbon\Carbon::parse($log->follow_up_date); $isPast = $followUpDate->isPast(); $isToday = $followUpDate->isToday(); @endphp

{{ $followUpDate->format('d/m/Y H:i') }}

@endif @if($log->outcome)

Resultado:

{{ $log->outcome }}

@if($log->outcome === 'Pago Programado' && $log->scheduled_payment_date)

Fecha de Pago Programado:

@php $paymentDate = \Carbon\Carbon::parse($log->scheduled_payment_date); $isPast = $paymentDate->isPast(); $isToday = $paymentDate->isToday(); @endphp

{{ $paymentDate->format('d/m/Y') }} @if($isPast) (Vencido) @elseif($isToday) (Hoy) @endif

@endif
@endif

Notas:

{{ $log->notes }}

@if($log->history->count() > 0)
Historial de Cambios
@foreach($log->history as $history) @endforeach
Fecha Acción Usuario Cambios
{{ $history->created_at->format('d/m/Y H:i') }} @if($history->action == 'created') Creado @elseif($history->action == 'updated') Actualizado @else Eliminado @endif {{ $history->user->name ?? 'N/A' }} {{ $history->changes ?? 'Sin cambios específicos' }}
@endif
Información del Cliente
@if($log->client)

Nombre:

{{ $log->client->business_name }}

@if($log->client->legal_name)

Razón Social:

{{ $log->client->legal_name }}

@endif @if($log->client->tax_id)

{{ getTaxDocumentLabel() }}:

{{ $log->client->tax_id }}

@endif @if($log->client->phone)

Teléfono:

{{ $log->client->phone }}

@endif @if($log->client->email)

Email:

{{ $log->client->email }}

@endif @if($log->client->address)

Dirección:

{{ $log->client->address }}

@endif @if($log->client->salesman)

Vendedor:

{{ $log->client->salesman->first_name }} {{ $log->client->salesman->last_name }}

@endif @else

Cliente no encontrado

@endif
@endsection