@extends('admin.layouts.app') @section('title', 'CRM Dashboard') @section('content')

CRM Dashboard

Overview of your sales pipeline

View All Leads Add Lead
Total Leads
{{ $stats['total_leads'] }}
New Leads
{{ $stats['new_leads'] }}
Hot Leads 🔥
{{ $stats['hot_leads'] }}
Converted
{{ $stats['converted'] }}
{{ $stats['conversion_rate'] }}% rate
This Month Value
₹{{ number_format($stats['total_deal_value'] / 100000, 2) }} Lac

Today's Follow-ups ({{ $stats['today_follow_ups'] }})

Overdue Follow-ups ({{ $stats['overdue_follow_ups'] }})

@if ($overdueFollowUps->count() > 0) @else

No overdue follow-ups 👏

@endif

Leads by Status

@php $statuses = App\Models\Lead::getStatuses(); $maxCount = !empty($leadsByStatus) ? max($leadsByStatus) : 1; @endphp @foreach ($statuses as $key => $info) @php $count = $leadsByStatus[$key] ?? 0; @endphp
{{ $info['label'] }} {{ $count }}
@endforeach

Leads by Source

@php $sources = App\Models\Lead::getSources(); $maxSourceCount = !empty($leadsBySource) ? max($leadsBySource) : 1; $colors = ['blue', 'green', 'purple', 'orange', 'pink', 'cyan', 'indigo', 'amber', 'teal', 'rose']; @endphp @foreach ($sources as $key => $label) @php $count = $leadsBySource[$key] ?? 0; $colorIndex = array_search($key, array_keys($sources)) % count($colors); @endphp @if ($count > 0)
{{ $label }} {{ $count }}
@endif @endforeach

Recent Leads

View All →
@foreach ($recentLeads as $lead) @endforeach
Lead Contact Source Priority Status Created
{{ $lead->name }} {{ $lead->phone }} {{ $lead->source_label }} {{ $lead->priority_label }} {{ $lead->status_label }} {{ $lead->created_at->diffForHumans() }}
@endsection