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

Option #{{ $option->id }} @if($option->code) Code: {{ $option->code }} @endif Rang {{ $option->getRang() }}

Créée le {{ $option->created_at->format('d/m/Y à H:i') }} @if($option->updated_at->ne($option->created_at)) • Modifiée le {{ $option->updated_at->format('d/m/Y à H:i') }} @endif

@php $otherOptions = $option->getOtherOptionsForSameProduct(); @endphp @if($otherOptions->count() > 0)
Autre(s) option(s) sur ce lot : @foreach($otherOptions as $otherOption) Rang {{ $otherOption->getRang() }} - {{ $otherOption->client?->fullName() ?? 'Client inconnu' }} @endforeach
@endif
Relations
@if($option->product) @if($option->product->program)
{{ $option->product->name }}
{{ $option->product->program->name }}
{{ $option->product->current_state->label() }}
@else
{{ $option->product->name }}
Aucun programme associé
{{ $option->product->current_state->label() }}
@endif @else

Aucun lot associé

@endif
@if($option->client)
{{ $option->client->fullName() }}
{{ $option->client->email }}
@else

Aucun client associé

@endif
@if($option->user)
{{ $option->user->fullName() }}
{{ $option->user->email }}
@else

Aucun utilisateur associé

@endif
@if($option->saleParameter)
Durée option {{ $option->saleParameter->option_duration_day }} jour(s)
Rang {{ $option->saleParameter->option_rang }}
@else

Aucun paramètre de vente

@endif
@if($option->state)
{{ $option->state->label() }}

{{ $option->state->description() }}

@else

Non défini

@endif
@if($option->date_end)

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

@else

Non définie

@endif
Prix de l'option
@if($option->prices && $option->prices->count() > 0)
@foreach($option->prices as $price) @endforeach
Type Montant Statut
@if($price->type_enum) {{ $price->type_enum->label() }} @else {{ $price->type }} @endif {{ number_format($price->value, 2, ',', ' ') }} € @if($price->read_only) Lecture seule @endif @if(!$price->is_active) Inactif @endif
@else
Aucun prix associé à cette option
@endif
Données enregistrées (Snapshot JSON)
@if($option->datas->count() > 0) @foreach($option->datas as $data)
Data #{{ $data->id }} {{ $data->created_at->format('d/m/Y H:i') }}
{{ json_encode($data->json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endforeach @else
Aucune donnée enregistrée
@endif
@endsection