@extends('layouts.app') @section('title', 'Lead Report') @section('page-title', 'Lead Report') @section('content') {{-- Filters --}}
Reset
{{-- Results --}}
Leads {{ $leads->total() }}
@if($leads->isEmpty())

No leads match the selected filters.

@else
@foreach($leads as $lead) @php $req = $lead->requirement; $client = $req ? $req->client : null; $daysOpen = $lead->created_at->diffInDays(now()); $stage = $lead->currentStage; $stageClass = $stage && $stage->is_closed_won ? 'text-success' : ($stage && $stage->is_closed_lost ? 'text-danger' : 'text-dark'); @endphp @endforeach
Client Requirement Stage Assigned To Days Open Last Activity
@if($client) {{ $client->full_name }} @else @endif {{ $req ? $req->title : '—' }} @if($req)
{{ \App\Models\ClientRequirement::INTEREST_TYPES[$req->interest_type] ?? '' }} @if($req->property_type) · {{ \App\Models\ClientRequirement::PROPERTY_TYPES[$req->property_type] ?? $req->property_type }} @endif
@endif
@if($stage) {{ $stage->name }} @else @endif {{ $lead->assignedTo ? $lead->assignedTo->name : '—' }} {{ $daysOpen }}d {{ $lead->last_activity_at ? $lead->last_activity_at->format('d M Y') : $lead->created_at->format('d M Y') }}
@if($leads->hasPages()) @endif @endif
@endsection