@props(['client' => null, 'action', 'method' => 'POST', 'submitText' => 'Créer le client', 'cancelUrl', 'redirectTo' => 'index', 'tags' => []]) @php $isEdit = $client !== null; $phoneValue = old('phone', $client?->phone ?? ''); if ($phoneValue && strlen($phoneValue) === 8) { $phoneValue = substr($phoneValue, 0, 2) . ' ' . substr($phoneValue, 2, 3) . ' ' . substr($phoneValue, 5, 3); } $checkDuplicateUrl = route('provider.api.clients.check-duplicate'); $clientUuid = $client?->uuid ?? ''; @endphp
@csrf @if($method !== 'POST') @method($method) @endif
{{-- Type de client --}} @if($isEdit) {{-- Affichage du type en mode édition (non modifiable) --}}
@if($client->type === 'particulier') Particulier @else Professionnel @endif
Non modifiable après création
@else {{-- Sélection du type en mode création --}}
@endif {{-- Champs Particulier --}}

⚠️ Un client avec un nom similaire existe déjà

@if($errors->has('tax_id'))

{!! $errors->first('tax_id') !!}

@endif
{{-- Champs Professionnel --}} {{-- Statut TVA --}}
{{-- Champ Téléphone et Email partagés --}}
@if($errors->has('phone'))

{!! $errors->first('phone') !!}

@endif {{-- Adresse partagée --}} {{ old('address', $client?->address) }} {{-- Tags --}}

Aucun tag disponible

{{-- Modale de confirmation doublon --}}

Client similaire détecté

Un ou plusieurs clients avec un nom similaire existent déjà :

Voulez-vous créer ce client quand même ?