@extends('client.layouts.dashboard') @section('title', 'Call Logs') @section('styles') @endsection @section('content')
View and analyze all call activity and auto-replies triggered
| User | Phone Number | Type | Status | Note | Duration | Auto-Reply | Time |
|---|---|---|---|---|---|---|---|
|
{{ strtoupper(substr($log->user->name ?? 'U', 0, 1)) }}
{{ $log->user->name ?? 'Unknown' }}
|
{{ $log->phone_number }}
@php
$channelLogs = ($log->smsLogs ?? collect())->sortByDesc(fn($i) => optional($i->sent_at)->timestamp ?? optional($i->created_at)->timestamp ?? 0);
$smsChannelLog = $channelLogs->first(fn($i) => ($i->channel ?? 'sms') === 'sms');
$whatsAppChannelLog = $channelLogs->first(fn($i) => ($i->channel ?? '') === 'whatsapp');
$displayContactName = $log->contact_name ?: optional($smsChannelLog)->contact_name ?: optional($whatsAppChannelLog)->contact_name;
@endphp
@if($displayContactName){{ $displayContactName }}@endif |
@php $nct = strtolower((string)$log->call_type); if(in_array($nct,['incoming','answered_externally','wifi'],true)) $nct='incoming'; elseif($nct==='outgoing') $nct='outgoing'; else $nct='missed'; @endphp @if($nct==='incoming')Incoming @elseif($nct==='outgoing')Outgoing @elseMissed@endif | @if($log->status_label){{ $log->status_label }} @else—@endif | {{ $log->status_note ?: '—' }} |
@if($log->call_duration){{ gmdate('H:i:s', $log->call_duration) }} @else-@endif | @if($log->sms_sent) @elseNo@endif |
{{ optional($log->call_time)->format('M d, Y') ?? $log->created_at->format('M d, Y') }}
{{ optional($log->call_time)->format('h:i A') ?? $log->created_at->format('h:i A') }} |
|
No call logs found |
|||||||