@extends('layouts.app') @section('title', 'CRM Pipeline') @section('content') @php($stages = ['new','contacted','qualified','documents_requested','quotation_sent','follow_up','negotiation','won','lost','application_created'])

Sales & relationship management

CRM Pipeline

Corporate prospects, walk-in opportunities and structured follow-ups.

@if(auth()->user()->hasPermission('crm.manage'))@endif
L

Open Leads

{{ $stageCounts->except(['won','lost'])->sum() }}

Across the active pipeline

F

Follow-ups Due

{{ $followUpsDue }}

Requires action now

AED

Pipeline Value

AED {{ number_format((float) $pipelineValue, 2) }}

Estimated open opportunity value

Won

{{ $stageCounts['won'] ?? 0 }}

Converted relationships

@if(auth()->user()->hasPermission('crm.manage'))

Create Lead

Capture the opportunity and assign the next follow-up.

@csrf
@endif
@forelse($leads as $lead)@empty@endforelse
LeadContactSourceValueOwner / Follow-upStageActivity
{{ $lead->lead_number }}{{ $lead->company_name ?: 'Individual prospect' }} {{ $lead->contact_name }}{{ $lead->mobile }}{{ $lead->email ? ' · '.$lead->email : '' }} {{ str($lead->source)->replace('_',' ')->title() }} AED {{ number_format((float) $lead->estimated_value, 2) }} {{ $lead->assignedUser?->name ?? 'Unassigned' }}{{ $lead->next_followup_at?->format('d M, h:i A') ?? 'No follow-up set' }} @if(auth()->user()->hasPermission('crm.manage'))
@csrf
@else{{ str($lead->stage)->replace('_',' ')->title() }}@endif
@if(auth()->user()->hasPermission('crm.manage'))
+ Follow-up
@csrf
@else{{ $lead->activities->count() }} logged@endif
LNo leads found

Add a lead to begin building the corporate and retail pipeline.

{{ $leads->links() }}
@endsection