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

{{ $customer->name }}

Client
@can('edit-clients')
@endcan
{{-- ====== COLONNE GAUCHE ====== --}}
{{-- Carte contacts --}}

Contact

@can('edit-clients') @endcan
@if ($customer->contact->isEmpty())
Aucun contact associé.
@else
@foreach ($customer->contact as $contact)
{{ $contact->firstname }} {{ $contact->lastname }} @if ($contact->user_id) Accès portail @endif
@if ($contact->job) {{ $contact->job }} @endif @if ($contact->phone) {{ $contact->phone }} @endif @if ($contact->email) {{ $contact->email }} @endif
@can('edit-contacts')
@endcan @if (!$contact->user_id) @can('grant-portal')
@endcan @else @can('revoke-portal')
@endcan @endif @can('edit-clients')
@endcan
@if (!$loop->last)
@endif @endforeach
@endif
{{-- Carte facturation --}}

Informations Facturation

@can('edit-clients')
Modifier
@endcan
{{-- Nom & Adresse --}}
Nom & Adresse
@if ($customer->billing_name) {{ $customer->billing_name }} @endif @if ($customer->billing_adress_1) {{ $customer->billing_adress_1 }}@if($customer->billing_adress_2)@endif @endif @if ($customer->billing_adress_2) {{ $customer->billing_adress_2 }} @endif @if ($customer->billing_zipcode || $customer->billing_city) {{ $customer->billing_zipcode }} {{ $customer->billing_city }} @endif @if ($customer->billing_country) {{ $customer->billing_country }} @endif @if (!$customer->billing_name && !$customer->billing_adress_1) n/a @endif
{{-- Contact --}}
Contact
@if ($customer->billing_contact) {{ $customer->billing_contact }} @endif @if ($customer->billing_phone) {{ $customer->billing_phone }} @endif @if ($customer->billing_email) {{ $customer->billing_email }} @endif @if (!$customer->billing_contact && !$customer->billing_phone && !$customer->billing_email) n/a @endif
{{-- Légal --}}
Légal
TVA Intracommunautaire : @if ($customer->vat_number) {{ $customer->vat_number }} @else n/a @endif
SIREN/SIRET : @if ($customer->siren) {{ $customer->siren }} @else n/a @endif
RCS : @if ($customer->rcs) {{ $customer->rcs }} @else n/a @endif
{{-- ====== COLONNE DROITE ====== --}}
{{-- Widgets --}}
{{ $customer->operations_count }} Opérations
{{ $customer->plan_media_proposals_count }} Plans Média
{{ number_format($customer->operations_sum_total_price ?? 0, 0, ',', ' ') }} € Total CA
{{-- Onglets --}}
{{-- Quick actions --}}
{{-- Suivi & Rappels --}}
@if ($timeline->isEmpty())
Aucune activité pour ce client.
@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
@endif @if ($entry['type'] === 'reminder' && !$done) @elseif ($entry['type'] === 'tracking')
@csrf @method('DELETE')
@endif
@endforeach
@endif
{{-- Opérations --}} {{-- Plan Média --}}
{{-- ====== DRAWER EDIT INFORMATIONS GÉNÉRALES ====== --}} {{-- ====== DRAWER EDIT FACTURATION ====== --}} {{-- ====== MODAL CRÉATION CONTACT ====== --}} {{-- ====== MODALS ÉDITION CONTACTS ====== --}} @foreach ($customer->contact as $contact) @endforeach {{-- ====== MODAL AJOUT RAPPEL ====== --}} {{-- ====== MODAL AJOUT NOTE ====== --}} @endsection