{{-- Page Header --}}

🌡 Curvas de Teñido

{{ $curves->count() }} curvas en total · {{ $curves->where('activa',true)->count() }} activas

Nueva Curva
{{-- Filter Bar --}}
{{-- Substrate Filter --}}
Sustrato: @foreach($substrates as $key => $label) @endforeach
{{-- Process Filter --}}
Proceso: @foreach($processes as $key => $label) @endforeach
{{-- Status Filter --}}
Estado:
{{-- Curve Grid --}}
@forelse($curves as $curve) @php $subCls = match($curve->tipo_fibra) { 'PA' => 'bg-blue-100 text-blue-700 border-blue-200', 'PA+EL' => 'bg-violet-100 text-violet-700 border-violet-200', 'PES' => 'bg-emerald-100 text-emerald-700 border-emerald-200', 'PES+EL' => 'bg-green-100 text-green-700 border-green-200', default => 'bg-emerald-100 text-emerald-700 border-emerald-200', }; $prCls = match(str_replace('+','_',$curve->process_type)) { 'Desize' => 'bg-yellow-100 text-yellow-800 border-yellow-200', 'Dye' => 'bg-red-100 text-red-800 border-red-200', 'Desize_Dye' => 'bg-pink-100 text-pink-800 border-pink-200', 'Machine_Wash'=> 'bg-sky-100 text-sky-800 border-sky-200', default => 'bg-slate-100 text-slate-800 border-slate-200', }; $crHex = \App\Models\DyeCurve::COLOR_RANGE_HEX[$curve->color_range] ?? '#9ca3af'; $svgPath = $curve->miniChartPath(280, 60); @endphp {{-- Inactive overlay strip --}} @if(!$curve->activa)
@endif {{-- Card Header --}}

{{ $curve->nombre }}

{{ $curve->descripcion ?: 'Sin descripción' }}

{{ $curve->tipo_fibra }} {{ $curve->process_type_label }}
{{-- Card Body --}}
{{-- Range indicator --}} @if($curve->color_range !== 'All')
{{ $curve->color_range_label }}
@endif {{-- Chart SVG --}} @if($svgPath)
@endif {{-- Stats Grid --}}
⏱ {{ $curve->total_min }} min
@if($curve->max_temp > 0)
🌡 {{ $curve->max_temp }}°C max
@endif
📋 {{ $curve->steps->count() }} pasos
🧪 {{ $curve->productionFormulas->count() }} recetas
{{-- Steps Pills (Wrapped) --}}
@foreach($curve->steps as $step) @php $tipoMeta = \App\Models\DyeCurveStep::TIPOS[$step->tipo] ?? []; $action = $tipoMeta['action'] ?? ''; $params = $tipoMeta['params'] ?? 'timed'; $abbr = match($action) { 'Heat' => 'CAL', 'Cool' => 'ENF', 'Maintain' => 'MAN', 'Overflow_Wash' => 'OVF', 'Fill_Water' => 'LLE', 'Load' => 'CAR', 'Drain' => 'VAC', 'Unload' => 'DES', 'Dosing' => 'DOS', 'Check_pH' => 'MED', default => 'LAV', }; $spCls = match($action) { 'Heat' => 'bg-red-50 text-red-700 border-red-100', 'Cool' => 'bg-emerald-50 text-emerald-700 border-emerald-100', 'Maintain' => 'bg-amber-50 text-amber-700 border-amber-100', 'Fill_Water', 'Overflow_Wash', 'Drain' => 'bg-cyan-50 text-cyan-700 border-cyan-100', 'Load', 'Unload'=> 'bg-slate-100 text-slate-700 border-slate-200', 'Dosing' => 'bg-violet-50 text-violet-700 border-violet-100', 'Check_pH' => 'bg-fuchsia-50 text-fuchsia-700 border-fuchsia-100', default => 'bg-blue-50 text-blue-700 border-blue-100', }; $detail = match($params) { 'thermal' => "{$step->temp_inicio_c}°→{$step->temp_final_c}°", 'temp_hold' => "{$step->temp_inicio_c}°", 'fill' => ($step->fill_target ?? '?') . ($step->fill_unit === 'L' ? 'L' : '%'), default => '', }; @endphp
{{ $abbr }} @if($detail) {{ $detail }} @endif · {{ $step->est_min }}m @if($step->ventana_adicion) @endif
@endforeach
{{-- Card Footer --}}
✏️ Editar
@empty
🌡

No se encontraron curvas

No hay curvas de teñido que coincidan con los filtros seleccionados, o aún no se ha creado ninguna.

@endforelse