@extends('back.layout.app') @section('title', config('app.name') . ' - ' . $customer->name) @php $breadcrumb = 'crm.prospects'; @endphp @push('styles') @endpush @section('content')

{{ $customer->name }}

Prospect
@can('edit-prospects')
@endcan
{{-- ====== COLONNE GAUCHE ====== --}}
{{-- Carte info --}}

{{ $customer->name }}

@can('convert-prospects')
Convertir en client
@endcan
Commercial : @if ($customer->user) {{ $customer->user->firstname }} @else n/a @endif
Secteur Activité : @if ($customer->activity) {{ $customer->activity->name }} @else n/a @endif
Thème : @if ($customer->theme) {{ $customer->theme->name }} @else n/a @endif
@if ($customer->comment)
Commentaires : {{ $customer->comment }}
@else
Commentaires : n/a
@endif
{{-- Carte contacts --}}

Contact

@can('edit-prospects') @endcan
@if ($customer->contact->isEmpty())
Aucun contact associé.
@else
@foreach ($customer->contact as $contact)
{{ $contact->firstname }} {{ $contact->lastname }}
@if ($contact->job) {{ $contact->job }} @endif @if ($contact->phone) {{ $contact->phone }} @endif @if ($contact->email) {{ $contact->email }} @endif
@can('edit-contacts')
@endcan @can('edit-prospects')
@endcan
@if (!$loop->last)
@endif @endforeach
@endif
{{-- ====== COLONNE DROITE ====== --}}
{{-- Widgets --}}
{{ $customer->operations_count }} Opérations
{{ number_format($customer->operations_sum_total_price ?? 0, 0, ',', ' ') }} € Total CA
{{-- Tabs --}}
{{-- Quick actions --}}
{{-- Suivi & Rappels --}}
@if ($timeline->isEmpty())
Aucune activité pour ce prospect.
@else
@foreach ($timeline as $entry) @php $item = $entry['item']; $done = $entry['type'] === 'reminder' && $item->is_done; @endphp
@if (!$loop->last)
@endif
@if ($entry['type'] === 'reminder') {{ $item->note ?: 'Rappel' }} {{ $item->alert_date }} @if ($done && $item->doer) · fait par {{ $item->doer->firstname }} @elseif ($item->owner) · {{ $item->owner->firstname }} @endif @else

{{ $item->comment }}

{{ $item->created_at }} @if ($item->user) · {{ $item->user->firstname }} @endif @endif
@if ($entry['type'] === 'reminder' && !$done)
@csrf @method('PATCH')
Marquer fait
@elseif ($entry['type'] === 'tracking')
@csrf @method('DELETE')
@endif
@endforeach
@endif
{{-- Propositions --}}
{{-- kt-card --}}
{{-- xl:col-span-2 --}}
{{-- ====== MODAL CONVERSION CLIENT ====== --}} {{-- ====== DRAWER EDIT PROSPECT ====== --}} {{-- ====== MODAL CRÉATION CONTACT ====== --}} {{-- ====== MODALS ÉDITION CONTACTS ====== --}} @foreach ($customer->contact as $contact) @endforeach {{-- ====== MODAL AJOUT RAPPEL ====== --}} {{-- ====== MODAL AJOUT NOTE ====== --}} @endsection