@extends('admin.layouts.app') @section('title', 'Dashboard') @push('styles') @endpush @section('content')
{{-- Stats --}}
{{ $stats['quotes_new'] }}
New quotes
{{ $stats['quotes_new'] > 0 ? 'Needs attention' : 'All reviewed' }}
{{ $stats['quotes_won'] }}
Quotes won
of {{ $stats['quotes_total'] }} total
{{ $stats['products_active'] }}
Active products
{{ $stats['products_total'] }} total
{{ $stats['contacts_unread'] }}
Unread contacts
{{ $stats['contacts_unread'] > 0 ? 'Needs response' : 'All read' }}
{{-- Pipeline + Funnel row --}}
Revenue pipeline
₹{{ number_format($pipeline / 100, 0) }}
Reviewing + Quoted
{{ $funnel['reviewing'] ?? 0 }} reviewing
{{ $funnel['quoted'] ?? 0 }} quoted
Quote funnel
@php $funnelSteps = ['new'=>'New','reviewing'=>'Reviewing','quoted'=>'Quoted','won'=>'Won','lost'=>'Lost']; $funnelColors = ['new'=>'var(--amber)','reviewing'=>'#3b82f6','quoted'=>'var(--navy)','won'=>'#22c55e','lost'=>'#ef4444']; @endphp @foreach($funnelSteps as $status => $label) @if(!$loop->first)
@endif
{{ $funnel[$status] ?? 0 }}
{{ $label }}
@endforeach
{{-- Chart + Top products --}}
Quotes — last 12 months
Top quoted products
@if($topProducts->isEmpty())
No quote items yet
@else @php $maxQty = $topProducts->max('total_qty') ?: 1; @endphp @foreach($topProducts as $tp)
{{ $tp->product_name }}
×{{ $tp->total_qty }}
@endforeach @endif
{{-- Recent quotes + Contacts --}}
Recent quotes
See all
@if($recentQuotes->isEmpty())
No quotes yet
@else
@foreach($recentQuotes as $q) @endforeach
Quote #CustomerStatusItemsDate
{{ $q->quote_number }} {{ $q->customer_name }}
{{ $q->company_name }}
{{ ucfirst($q->status) }} {{ $q->items->count() }} {{ $q->created_at->format('d M') }}
@endif
{{-- Recent contacts --}}
Recent contacts
See all
@if($recentContacts->isEmpty())
No submissions yet
@else @foreach($recentContacts as $c)
{{ strtoupper(substr($c->name, 0, 2)) }}
{{ $c->name }} @if($c->status === 'unread')@endif
{{ Str::limit($c->message, 40) }}
@endforeach @endif
{{-- Quick actions --}}
@endsection @push('scripts') @endpush