@extends('backend.layouts.master') @section('title') Catering @endsection @section('body') @endsection @section('content') {{-- @component('components.breadcrumb') @slot('page_title') Catering @endslot @slot('subtitle') Catering @endslot @endcomponent --}}
Catering
{{-- Tri par le plus petit `ordre` du bloc : `first()->ordre` seul dépendrait de l'ordre d'arrivée des lignes. Repli alphabétique pour les événements dont les `ordre` sont vides. --}} @php $labelPrecedent = null; @endphp @foreach ($workshops->groupBy('groupe')->sortBy(fn($group, $cle) => sprintf('%06d-%s', (int) $group->min('ordre'), $cle)) as $groupe => $workshopsGroup) @php $workshopsGroup = $workshopsGroup->sortBy('ordre'); // Des blocs de **packs** consécutifs au même libellé forment // un seul en-tête : les 9 packs CROPA sont répartis sur // pack_ven / pack_sam / pack_2j sous « Les Packs ». // Restreint à `f2 = 'pack'` : d'anciens événements ont // plusieurs groupes indépendants sous un même label // (masterclass CROPA, groupes b/c/d). $premier = $workshopsGroup->first(); $repeteLEnTete = $premier->f2 === 'pack' && filled($premier->label) && $premier->label === $labelPrecedent; $labelPrecedent = $premier->label; @endphp @if ($premier->header_visible == 1 && ! $repeteLEnTete) @endif @foreach ($workshopsGroup as $index => $workshop) @endforeach @endforeach
{{ $premier->label }} Capacité Disponible Pré-inscrits Validés Présents
{{ $workshop->titre }} {{ $workshop->capacity }} @if ($workshop->capacity - $workshop->participants_count > 0) {{ $workshop->capacity - $workshop->participants_count }} @else 0 @endif @if ($workshop->participants_count <= $workshop->capacity) {{ $workshop->participants_count }} @else {{ $workshop->participants_count }} @endif {{ $workshop->validated_participants_count }} {{ $workshop->present_and_validated_participants_count }}
@endsection