@extends('layouts.admin') @php $isQuote = $channel === 'quote'; $pageTitle = $isQuote ? 'Get Quote' : 'Contact'; $pageRoute = $isQuote ? 'admin.leads.quotes' : 'admin.leads.contact'; $bulkRoute = 'admin.leads.inquiries.bulk'; @endphp @section('title', $pageTitle.' leads') @section('eyebrow', 'Leads') @section('heading', $pageTitle) @section('content')

{{ $leads->total() }} {{ $isQuote ? 'quote' : 'contact' }} lead(s)

@if ($isQuote) @else @endif @forelse ($leads as $lead) @if ($isQuote) @else @endif @empty @endforelse
Reference ContactLane ServiceType MessageStatus Received Actions
{{ $lead->reference_no }}

{{ $lead->contact_name }}

{{ $lead->email }}

@if ($lead->phone)

{{ $lead->phone }}

@endif @if ($lead->company_name)

{{ $lead->company_name }}

@endif
{{ $lead->origin_pincode ?: '—' }} → {{ $lead->destination_pincode ?: '—' }} {{ $lead->service_interest ?: '—' }} {{ $lead->type }}

{{ $lead->message }}

@php $badge = match ($lead->status) { 'new' => 'bg-sky-50 text-sky-700', 'in_progress' => 'bg-amber-50 text-amber-700', 'quoted' => 'bg-violet-50 text-violet-700', 'won' => 'bg-emerald-50 text-emerald-700', 'lost', 'closed' => 'bg-slate-100 text-slate-600', default => 'bg-slate-100 text-slate-600', }; @endphp {{ str_replace('_', ' ', $lead->status) }} {{ $lead->created_at?->format('d M Y H:i') }} View
@csrf @method('DELETE')
No {{ $isQuote ? 'quote' : 'contact' }} leads yet.
@if ($leads->hasPages())
{{ $leads->links() }}
@endif
@if ($viewing)

{{ $viewing->reference_no }}

{{ $viewing->contact_name }}

Email
{{ $viewing->email }}
Phone
{{ $viewing->phone ?: '—' }}
Company
{{ $viewing->company_name ?: '—' }}
Type
{{ $viewing->type }}
@if ($isQuote)
Origin pin
{{ $viewing->origin_pincode ?: '—' }}
Destination pin
{{ $viewing->destination_pincode ?: '—' }}
Service
{{ $viewing->service_interest ?: '—' }}
Weight (kg)
{{ $viewing->approx_weight_kg ?: '—' }}
@endif
Message / details
{{ $viewing->message ?: '—' }}
Received
{{ $viewing->created_at?->format('d M Y, H:i') }}
@csrf @method('PUT')
@endif
@endsection