@extends('layouts.admin') @section('title', 'Leads') @section('content')
{{-- Page Header --}}

Active Leads

Manage and track all incoming quotation requests

{{ $quotations->total() }} Total Leads
{{-- Search & Filter Bar --}}
{{-- Table Card --}}
@forelse($quotations as $q) {{-- Quote Number --}} {{-- Client Name + Avatar --}} {{-- Contact --}} {{-- Project Type Badge --}} {{-- Location --}} {{-- Date --}} {{-- Action --}} @empty @endforelse
Quote No Client Contact Project Type Location Received On
{{ strtoupper(substr($q->state_code ?? '', 0, 2)) }}-{{ \Carbon\Carbon::parse($q->created_at)->format('y') }}-{{ str_pad($q->id ?? 0, 3, '0', STR_PAD_LEFT) }}
{{ $q->name }}
{{ $q->email }}
{{ $q->phone }}
@php $colors = [ 'Industrial Shed' => ['bg' => '#ede9fe', 'text' => '#6d28d9'], 'Warehouse' => ['bg' => '#dbeafe', 'text' => '#1d4ed8'], 'Factory' => ['bg' => '#dcfce7', 'text' => '#15803d'], ]; $typeName = $q->projectType->name ?? 'N/A'; $color = $colors[$typeName] ?? ['bg' => '#f3f4f6', 'text' => '#374151']; @endphp {{ $typeName }}
{{ $q->location ?? 'N/A' }}
{{ \Carbon\Carbon::parse($q->created_at)->format('d M Y') }}
{{ \Carbon\Carbon::parse($q->created_at)->diffForHumans() }}
No leads found

No quotation leads match your current filters.

{{-- Footer: count + pagination --}}
Showing {{ $quotations->firstItem() }}–{{ $quotations->lastItem() }} of {{ $quotations->total() }} leads {{ $quotations->links('pagination::bootstrap-5') }}
@endsection