@php $ref = $color->reference_data ?? []; $hex = $color->fallback_hex ?? $color->color_hex ?? '#6B7280'; $hasRef = !empty($ref['l_star']); @endphp
Color Estándar
{{ $color->code }} — {{ $color->name }}
{{ $color->client ?: '' }}{{ $color->season ? ' · '.$color->season : '' }} {{ $color->articulo_id ? ' · '.$color->articulo_id : '' }}
@if(!empty($ref['tcx_code']))
Pantone TCX
{{ $ref['tcx_code'] }}
@endif @if($hasRef)
Referencia CIE L*a*b*
{{ number_format($ref['l_star'],2) }}
L*
{{ number_format($ref['a_star']??0,2) }}
a*
{{ number_format($ref['b_star']??0,2) }}
b*
@else
Sin valores L*a*b* de referencia.
Agregar desde Colores →
@endif
{{ $trials->count() }}
Total trials
{{ $trials->where('status','Approved_in_Lab')->count() }}
Aprobados
{{ $trials->where('status','Draft')->count() }}
Borrador
@if($hasRef)
{{ $trials->filter(fn($t) => $t->delta_e !== null && $t->delta_e <= 1.0)->count() }}
ΔE ≤ 1.0 (Pass)
@endif
@forelse($trials as $trial) @php $pf = $trial->pass_fail; $cardCls = match($trial->status) { 'Approved_in_Lab' => 'approved', default => '', }; // Max %owf for bar scaling $maxPct = $trial->formulaItems->max('concentration_owf') ?: 1; @endphp
{{ $trial->version_name }} {{ $trial->status === 'Approved_in_Lab' ? '✓ Aprobado Lab' : 'Borrador' }}
@php $deCls = match($pf) { 'PASS' => 'pass', 'MARGINAL' => 'marginal', 'FAIL' => 'fail', default => 'no-data', }; @endphp
{{ $trial->delta_e !== null ? 'ΔE '.number_format($trial->delta_e, 2) : '—' }}
{{ $pf === 'PASS' ? 'DENTRO DEL ESTÁNDAR' : ($pf === 'MARGINAL' ? 'MARGINAL' : ($pf === 'FAIL' ? 'FUERA DEL ESTÁNDAR' : 'Sin medición')) }}
@if($trial->read_l !== null)
L* {{ number_format($trial->read_l,2) }}
a* {{ number_format($trial->read_a,2) }}
b* {{ number_format($trial->read_b,2) }}
@if($trial->measured_stage)
{{ ucfirst($trial->measured_stage) }}
@endif
@endif
@if($trial->formulaItems->isNotEmpty()) @foreach($trial->formulaItems as $item) @endforeach
Colorante % owf
{{ $item->dyestuff?->name ?? '—' }}
{{ number_format($item->concentration_owf,4) }}
@else

Sin colorantes registrados.

@endif @if($trial->trial_notes)
{{ $trial->trial_notes }}
@endif @if($trial->measured_at)
Medido: {{ $trial->measured_at->format('d/m/Y') }}
@endif
@empty
🧫
No hay trials registrados
Clic para crear el primer trial de laboratorio
@endforelse @if($trials->isNotEmpty())
+
Nuevo Trial
@endif
@if($showTrialModal) @endif