@extends('layouts.app') @section('title', 'Leads') @section('content') @if ($pipelines->count() > 1)
@endif List view @can('create', \App\Models\Lead::class) New lead @endcan
{{-- Stage colours run cool to warm along the funnel, so the board reads at a glance without a legend. See docs/DESIGN-TOKENS.md. --}}
@foreach ($stages as $stage) @php $cards = $grouped[$stage->id] ?? collect(); @endphp
{{ $stage->name }} {{ $stage->probability }}%
{{ $cards->count() }} {{ \Illuminate\Support\Str::plural('record', $cards->count()) }} @if ($cards->sum('expected_value') > 0) · {{ money((float) $cards->sum('expected_value'), (string) $currency) }} @endif
@foreach ($cards as $lead)
{{ $lead->title }} @if ($lead->company_name){{ $lead->company_name }}@endif
{{ $lead->expected_value ? money((float) $lead->expected_value, (string) ($lead->currency ?: $currency)) : '—' }} @if ($lead->owner)@endif
@endforeach
@endforeach

Drag a card to move it. A card with an amber edge has sat in its stage longer than that stage allows.

@endsection