@extends('layouts.base') @section('content') @section('breadcrumb') @endsection
@if(session('success')) @endif

{{ $mandat->numero ?: 'Sans numéro' }}

@if($mandat->type) {{ $mandat->type->label() }} @endif @if($mandat->nature) {{ $mandat->nature->label() }} @endif
Informations détaillées
Informations du mandat

{{ $mandat->numero ?: 'Non défini' }}

@if($mandat->type) {{ $mandat->type->label() }}
{{ $mandat->type->description() }} @else Non défini @endif

@if($mandat->nature) {{ $mandat->nature->label() }}
{{ $mandat->nature->description() }} @else Non défini @endif

@if($mandat->relation_type) {{ $mandat->relation_type->label() }} - {{ $mandat->relation_type->roleLabel() }}
{{ $mandat->relation_type->description() }} @else Non défini @endif

@if($mandat->commission && $mandat->commission_type) {{ number_format($mandat->commission, 2, ',', ' ') }} {{ $mandat->commission_type->unite() }}
{{ $mandat->commission_type->label() }} @else Non définie @endif

Acteurs

@if($mandat->mandant && $mandat->mandant->mandantable) @if($mandat->mandant->mandantable instanceof \App\Models\User) {{ $mandat->mandant->mandantable->fullName() }}
{{ $mandat->mandant->mandantable->email }} @elseif($mandat->mandant->mandantable instanceof \App\Models\Company) {{ $mandat->mandant->mandantable->name }} @if($mandat->mandant->mandantable->type)
{{ $mandat->mandant->mandantable->type->label() }} @endif @endif @else Non défini @endif

@if($mandat->user) {{ $mandat->user->fullName() }}
{{ $mandat->user->email }} @else Non défini @endif

@if($mandat->date_signature) {{ $mandat->date_signature->format('d/m/Y') }} @else Non définie @endif

@if($mandat->date_expiration) {{ $mandat->date_expiration->format('d/m/Y') }} @if($mandat->date_expiration->isPast()) Expiré @elseif($mandat->date_expiration->isFuture()) En cours @endif @else Non définie @endif

@if($mandat->note_interne_text)

{{ $mandat->note_interne_text }}

Cette note n'est visible qu'en interne
@endif @if($mandat->products && $mandat->products->count() > 0)
Lots associés ({{ $mandat->products->count() }})
@foreach($mandat->products as $product)
Lot {{ $product->number }}
@if($product->program) {{ $product->program->name }} @endif
@endforeach
@endif
Dates système

{{ $mandat->created_at->format('d/m/Y à H:i') }}

{{ $mandat->updated_at->format('d/m/Y à H:i') }}

@if(isset($formEditor) && $formEditor && $formEditor->fields->count() > 0)
Champs personnalisés
Données 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 $fieldValue = $field->data && isset($field->data->json['value']) ? $field->data->json['value'] : null; @endphp @if($fieldValue !== null && $fieldValue !== '')
@if($field->type === \App\Enums\FieldType::TEXT || $field->type === \App\Enums\FieldType::NUMBER)

{{ $fieldValue }}

@elseif($field->type === \App\Enums\FieldType::CHECKBOX)

@if($fieldValue == '1') Activé @else Désactivé @endif

@elseif($field->type === \App\Enums\FieldType::DATE)

{{ \Carbon\Carbon::parse($fieldValue)->format('d/m/Y') }}

@else

{{ $fieldValue }}

@endif @if($field->description) {{ $field->description }} @endif
@endif @endforeach
@if($formEditor->fields->filter(fn($f) => $f->data && isset($f->data->json['value']) && $f->data->json['value'] !== '')->count() === 0)
Aucune donnée personnalisée renseignée
@endif
@endif @if($mandat->documents->count() > 0)
Documents PDF (Glissez-déposez pour réorganiser)
@endif
@if($mandat->documents->count() > 0) @endif @endsection