@extends('layouts.base') @section('content') @section('breadcrumb') @endsection
{{ isset($mandat) ? 'Modifier le mandat' : 'Créer un mandat' }}
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @if(isset($mandat)) @method('PUT') @endif
Informations de base
Référence unique du mandat
Optionnel - Pour les CGP uniquement
@if(old('commission_type', isset($mandat) ? $mandat->commission_type?->value : '')) @php $commType = \App\Enums\CalculCommission::tryFrom(old('commission_type', isset($mandat) ? $mandat->commission_type?->value : '')); @endphp {{ $commType ? $commType->unite() : '' }} @endif
Cette note n'est visible qu'en interne

Mandant (Propriétaire du bien)
@php $defaultMandantType = isset($mandat) ? (isset($mandat->mandant) && $mandat->mandant->mandantable instanceof \App\Models\User ? 'user' : 'company') : 'user'; // Par défaut 'user' lors de la création @endphp
@if($company)
{{ $company->name }} @if($company->type) {{ $company->type->label() }} @endif
@else
Aucune entreprise associée à cette application
@endif

Lots concernés par le mandat
@if($programs->isEmpty())
Aucun programme disponible. Créez d'abord un programme avec des lots.
@else
@endif
Documents PDF
@if(isset($mandat) && $mandat->documents->count() > 0)
@endif
Sélection multiple possible
@if(isset($formEditor) && $formEditor && $formEditor->fields->count() > 0)
Champs personnalisés
Ces champs sont spécifiques à cette application
Note : Ces champs ne concernent pas l'affichage sur le site de diffusion. Ils sont uniquement utilisés pour la gestion interne.
@foreach($formEditor->fields as $field)
@php $fieldName = $field->name ?? 'field_' . $field->id; $fieldLabel = $field->label ?? $field->type->label(); $fieldValue = old('custom_fields.' . $fieldName); if ($fieldValue === null && $field->data && isset($field->data->json['value'])) { $fieldValue = $field->data->json['value']; } @endphp @if($field->description) {{ $field->description }} @endif @if($field->type === \App\Enums\FieldType::TEXT) @elseif($field->type === \App\Enums\FieldType::CHECKBOX)
@elseif($field->type === \App\Enums\FieldType::NUMBER) @elseif($field->type === \App\Enums\FieldType::DATE) @endif
@endforeach
@endif
Annuler
@endsection