@extends('layout.app') @section('content') {{-- ==================== STAT TILES ==================== --}}
0

Total Leads

Captured by AI voice agent.

{{ implode(',', $leadsTrend) }}
0

Total Inquiries

Received via agent calls.

{{ implode(',', $inquiriesTrend) }}
0

Property Listings

Active listings in system.

{{ implode(',', $propertiesTrend) }}
0

Agent Logs

Total actions logged today.

{{ implode(',', $logsTrend) }}

{{-- ==================== CHARTS ROW ==================== --}}
Agent Performance Stats
Total Leads
{{ $totalLeads }} captured
{{ implode(',', $leadsTrend) }}
Total Inquiries
{{ $totalInquiries }} received
{{ implode(',', $inquiriesTrend) }}

Live Agent Activity
real-time log stream


{{-- ==================== RECENT LEADS + RECENT LOGS ==================== --}}
Recent Leads
@forelse($recentLeads as $i => $lead) @empty @endforelse
# Name Phone Source Status Date
{{ $i + 1 }} {{ $lead->name ?? 'N/A' }} {{ $lead->phone ?? '-' }} {{ $lead->source ?? 'Voice Agent' }} @php $status = $lead->status ?? 'new'; @endphp {{ ucfirst($status) }} {{ \Carbon\Carbon::parse($lead->created_at)->format('d M Y') }}
No leads found.
Recent Agent Logs
@forelse($recentLogs as $log) @empty @endforelse
Type Number Duration Time
@php $type = $log->type ?? 'info'; @endphp {{ ucfirst($type) }} {{ \Illuminate\Support\Str::limit($log->caller_number ?? 'No number', 40) }} {{ $log->duration_seconds ?? 0 }}s {{ \Carbon\Carbon::parse($log->created_at)->diffForHumans() }}
No logs found.

{{-- ==================== RECENT INQUIRIES + PROPERTIES ==================== --}}
Recent Inquiries
@forelse($recentInquiries as $inquiry) @empty @endforelse
Name Property Interest Agreed Rent Status Date
{{ $inquiry->customer_name ?? 'N/A' }} {{ \Illuminate\Support\Str::limit($inquiry->property_id ?? '-', 30) }} {{ $inquiry->agreed_rent ?? 0.00 }} @php $s = strtolower($inquiry->status ?? 'pending'); // Color Mapping $color = 'warning'; // Default (Pending) if($s == 'scheduled' || $s == 'resolved') $color = 'success'; if($s == 'cancelled' || $s == 'rejected') $color = 'danger'; @endphp {{ ucfirst($s) }} {{ \Carbon\Carbon::parse($inquiry->created_at)->format('d M') }}
No inquiries found.
Recent Property Listings
@forelse($recentProperties as $property) @empty @endforelse
ID Address Type Max Rent Status
{{ $property->_id ?? 'N/A' }} {{ \Illuminate\Support\Str::limit($property->address ?? 'N/A', 25) }} {{ $property->type ?? '-' }} {{ $property->rent_max ? '$'.number_format($property->rent_max) : '-' }} @php $ps = $property->status ?? 'active'; @endphp {{ ucfirst($ps) }}
No properties found.
@endsection