@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content')
{{-- Stat Card Macro: number+label LEFT, icon RIGHT --}}
{{ number_format($stats['total_customers']) }}
Total Customers
{{ number_format($stats['total_calls']) }}
Total Calls
{{ number_format($stats['completed_calls']) }}
Completed
{{ number_format($stats['failed_calls']) }}
Failed
{{ number_format($stats['pending_calls']) }}
Pending
@php $avg = $stats['avg_duration']; @endphp
{{ $avg > 0 ? intdiv($avg,60).'m '.($avg%60).'s' : '—' }}
Avg Duration
{{ number_format($stats['positive']) }}
Positive
{{ number_format($stats['negative']) }}
Negative
Recent Calls View All
@forelse($recentCalls as $call) @empty @endforelse
CustomerProductStatus FeedbackDurationWhen
{{ strtoupper(substr($call->customer->customer_name ?? '?', 0, 1)) }}
{{ $call->customer->customer_name ?? '—' }}
{{ $call->customer->product_name ?? '—' }} @php $sc = match($call->status) { 'completed' => 'completed', 'failed','no-answer' => 'failed', default => 'calling' }; @endphp {{ ucfirst($call->status) }} @if($call->sentiment) {{ ucfirst($call->sentiment) }} @else @endif {{ $call->formatted_duration }} {{ $call->created_at->diffForHumans() }}
No calls yet. Go to Customers and start a campaign.
@endsection