{{-- resources/views/stocks/pim-workspace.blade.php --}} Catalogue Dickson Coatings @include('partials.topbar') {{-- ===== BARRE D'EN-TÊTE ===== --}}
Catalogue PIM Dickson Coatings {{ $total }} coloris affiché{{ $total > 1 ? 's' : '' }} @if($active['en_stock']) · en stock uniquement @endif ✕ Réinitialiser
{{-- ===== LAYOUT 3 COLONNES ===== --}}
{{-- ==================================================== COLONNE 1 : FILTRES PIM ==================================================== --}}
{{-- Conserver le coloris sélectionné si on filtre --}} @if($selectedColorisId) @endif {{-- ---- EN STOCK ---- --}}
{{-- ---- GAMME (STYLE) ---- --}} @if(count($filterOptions['gammes']))
Gamme
@foreach($filterOptions['gammes'] as $ref => $nom) @endforeach
@endif {{-- ---- MARCHÉ ---- --}} @if(count($filterOptions['marches']))
Marché
@foreach($filterOptions['marches'] as $val) @endforeach
@endif {{-- ---- APPLICATION ---- --}} @if(count($filterOptions['applications']))
Application
@foreach($filterOptions['applications'] as $val) @endforeach
@endif {{-- ---- FINITION ---- --}} @if(count($filterOptions['finitions']))
Finition
@foreach($filterOptions['finitions'] as $code => $nom) @endforeach
@endif {{-- ---- LAIZE ---- --}} @if(count($filterOptions['laizes']))
Laize
@foreach($filterOptions['laizes'] as $val => $label) @endforeach
@endif {{-- ---- RÉSISTANCE FEU ---- --}} @if(count($filterOptions['feu']))
Classement feu
@foreach($filterOptions['feu'] as $val) @endforeach
@endif
{{-- séparateur --}}
{{-- ==================================================== COLONNE 2 : GRILLE PRODUITS + DÉTAIL LOTS ==================================================== --}}
@if($total === 0)

Aucun coloris ne correspond aux filtres sélectionnés.

@else {{-- ---- En-tête résultats ---- --}}
{{ $total }} coloris @if($active['gamme']) · gamme {{ $active['gamme'] }}@endif @if($active['finition']) · finition {{ $active['finition'] }}@endif @if($active['laize']) · laize {{ $active['laize'] }} cm@endif
{{-- ---- Grille cartes produit ---- --}} @endif {{-- ---- SECTION DÉTAIL (lots) ---- --}} @if($selectedColoris)
{{ $selectedColoris->style_nom }} — {{ $selectedColoris->coloris_nom }} {{ $selectedColoris->finition_code }} ({{ $selectedColoris->sap_color_reference }})
@if($selectedColoris->fiche_technique_fr) 📄 Fiche technique @endif
{{-- Specs techniques rapides --}} @php $sa = $selectedColoris->style_attributs; $ca = $selectedColoris->coloris_attributs; // Helper: extraire une valeur PIM (peut être string ou array) $pimStr = function($attr, $key) { $v = $attr[$key]['valeur'] ?? ($attr[$key] ?? null); if (is_null($v)) return ''; return is_array($v) ? implode(', ', array_filter(array_map('strval', $v))) : (string)$v; }; $specs = []; if ($pimStr($sa, 'poids')) $specs[] = ['Poids', $pimStr($sa, 'poids').' '.($sa['poids']['unite'] ?? 'g/m²')]; if ($pimStr($sa, 'dsc_enduction')) $specs[] = ['Enduction', $pimStr($sa, 'dsc_enduction')]; if ($pimStr($sa, 'dsc_finition')) $specs[] = ['Finition', $pimStr($sa, 'dsc_finition')]; if ($pimStr($sa, 'dsc_resistance_feu_NFP92503')) $specs[] = ['Feu (NF P92)', $pimStr($sa, 'dsc_resistance_feu_NFP92503')]; if ($pimStr($sa, 'dsc_resistance_feu_euroclasse')) $specs[] = ['Euroclasse', $pimStr($sa, 'dsc_resistance_feu_euroclasse')]; if ($pimStr($sa, 'dsc_garantie')) $specs[] = ['Garantie', $pimStr($sa, 'dsc_garantie').' '.($sa['dsc_garantie']['unite'] ?? 'ans')]; $rsol = $ca['ref_solaire']['valeur'] ?? null; if ($rsol) $specs[] = ['Réfl. solaire', $rsol.'%']; $fsol = $ca['fact_solaire']['valeur'] ?? null; if ($fsol) $specs[] = ['Facteur solaire', $fsol]; $tv = $ca['trans_visuelle']['valeur'] ?? null; if ($tv) $specs[] = ['Trans. visuelle', $tv.'%']; $apps = $sa['dsc_applications']['valeur'] ?? []; if ($apps) $specs[] = ['Applications', implode(', ', (array)$apps)]; @endphp @if(count($specs))
@foreach($specs as [$k, $v])
{{ $k }}{{ $v }}
@endforeach
@endif {{-- Lots disponibles --}} @if($lots->isEmpty())

Aucun lot disponible en stock.

@else
Lots disponibles ({{ $lots->count() }})
@foreach($lots as $lot) @endforeach
Laize Lg prévue Lot Net (m) Choix Emplacement Fabrication
{{ $lot->sales_width ? number_format($lot->sales_width * 100, 0).' cm' : '—' }} {{ $lot->planned_length ? $lot->planned_length.' m' : '—' }} {{ $lot->lot }} {{ number_format($lot->net_length, 1, ',', ' ') }} {{ $lot->choix ?? '—' }} {{ $lot->storage_location ?? '—' }} {{ $lot->manufactured_at ? \Carbon\Carbon::parse($lot->manufactured_at)->format('Y-m') : '—' }}
@csrf
@endif
@endif
{{-- séparateur --}}
{{-- ==================================================== COLONNE 3 : PANIER ==================================================== --}}
@include('cart._panel')
{{-- /.layout --}} {{-- ===== JS RESIZER ===== --}}