@extends('layouts.app') @section('title','Prospects (CRM)') @section('heading','Prospects') @section('actions')➕ Nouveau prospect@endsection @section('content')
Réinitialiser
@forelse($prospects as $p) @empty @endforelse
N° Société Téléphone Email Étape Projets Prochaine relance
{{ $p->id }} {{ $p->company ?: $p->civilName() }} {{ $p->phone ?: $p->mobile }} @if($p->email){{ $p->email }}@endif
{{-- Le statut n'est affiché que lorsqu'il sort du cours normal (converti / perdu) --}} @if($p->status !== 'actif')@endif
@if($p->isLost() && $p->lostReasonLabel())
{{ $p->lostReasonLabel() }}
@endif
@php $ouverts = $p->projects->whereIn('status', ['en_cours','en_attente']); $bGlobal = $ouverts->where('budget_period','global')->sum('amount'); $bMensuel = $ouverts->where('budget_period','mensuel')->sum('amount'); @endphp @if($p->projects->isEmpty()) Aucun @else
{{ $p->projects->count() }} projet{{ $p->projects->count() > 1 ? 's' : '' }}
@if($bGlobal)
{{ eur($bGlobal) }}
@endif @if($bMensuel)
{{ eur($bMensuel) }}/mois
@endif @endif
@if($p->next_action_date) @php $retard = $p->next_action_date->isPast() && ! $p->next_action_date->isToday(); @endphp
{{ $p->next_action_date->format('d/m/Y') }} @if($retard) (en retard) @elseif($p->next_action_date->isToday()) (aujourd'hui) @endif
@if($p->next_action)
{{ $p->next_action }}
@endif @else Aucune relance prévue @endif
→
{{ $prospects->links() }}
{{-- /#prospects-results --}}
@push('scripts') @endpush @endsection