@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content') {{-- Period Selector --}}
Good {{ now()->hour < 12 ? 'morning' : (now()->hour < 17 ? 'afternoon' : 'evening') }}, {{ auth()->user()->name }} ๐Ÿ‘‹

Here's what's happening with your leads today.

@foreach(['today' => 'Today', 'week' => 'This Week', 'month' => 'This Month', 'year' => 'This Year'] as $key => $label) {{ $label }} @endforeach
{{-- Stat Cards --}}
{{ number_format($totalLeads) }}
Total Leads
{{ number_format($soldLeads) }}
Deals Closed
{{ $totalLeads > 0 ? round(($soldLeads/$totalLeads)*100,1) : 0 }}%
Conversion Rate
{{ $totalSalesReps }}
Active Sales Reps
{{-- Chart --}}
Lead Trend (Last 30 Days)
{{-- By Status --}}
By Status
@foreach($leadsByStatus as $item) @php $opt = $statuses->firstWhere('value', $item->status); $color = $opt?->color ?? 'secondary'; $label = $opt?->label ?? ucwords(str_replace('_',' ',$item->status)); @endphp
{{ $label }}
{{ $item->total }}
@endforeach
{{-- Top Sales Reps --}}
Top Sales Representatives Full Report
@forelse($topReps as $rep) @empty @endforelse
Rep Leads Sold Conv. Rate
{{ $rep->name }}
{{ $rep->email }}
{{ $rep->leads_count }} {{ $rep->sold_count }} @php $cr = $rep->leads_count > 0 ? round(($rep->sold_count/$rep->leads_count)*100,1) : 0; @endphp
{{ $cr }}%
No data available
{{-- Recent Activity --}}
Recent Activity View All
@forelse($recentActivity as $log)
{{ $log->user_name }} {{ $log->action_label }} @if($log->subject_label) {{ $log->subject_label }} @endif
{{ $log->created_at->diffForHumans() }} ยท {{ $log->ip_address }}
@empty
No activity yet
@endforelse
@endsection @push('scripts') @endpush