@if (!$event->is_quick_mode)
is_congressiste == '1')) checked @endif>
category == 'Exposant' ? 'checked' : '') }} required>
category == 'Presse' ? 'checked' : '') }} required>
category == 'ONG' ? 'checked' : '') }} required>
category == 'Staff' ? 'checked' : '') }} required>
category == 'Team' ? 'checked' : '') }} required>
category == 'Manager' ? 'checked' : '') }} required>
@php // Detect if participant was saved with libre-mode prices (stored price != standard price) $storedWorkshopPrices = []; $hasLibrePrices = false; if (isset($participant) && $participant->workshops) { foreach ($participant->workshops->groupBy('workshop_id') as $wId => $entries) { $storedWorkshopPrices[$wId] = (float) $entries->first()->price; } foreach ($event->workshops as $ws) { if (isset($storedWorkshopPrices[$ws->id]) && $storedWorkshopPrices[$ws->id] != (float) $ws->prix) { $hasLibrePrices = true; break; } } } @endphp
@if ($event->has_adhesion)
isAd == '1') checked @endif>
@endif @if ($event->has_resident)
is_resident == 1) checked @endif>
@endif @php $preferentiel = 0; if ($event->has_before_date == 1 && $event->is_before_date_active == 1) { $preferentiel = 1; } else { $preferentiel = 0; } if (isset($participant)) { if ($participant->is_before_date == 1) { $preferentiel = 1; } elseif (isset($participant->created_at) && $participant->created_at > $event->before_date) { $preferentiel = 0; } } @endphp @if ($event->has_before_date) @can('participant_change_preferentiel_price')
@endcan @endif @if ($event->is_libre_mode)
@endif @if ($event->has_bdc)
isBDC == 1) checked @endif>
@endif
{{-- Tri des blocs par le plus petit `ordre` de leurs lignes, avec repli alphabétique : sans cela `sam_*` passerait avant `ven_*` et le samedi s'afficherait avant le vendredi. Les événements dont les `ordre` sont vides (13 des 47 en base) gardent le tri alphabétique d'origine, l'`ordre` valant alors 0 partout — leur affichage est inchangé. Le regroupement reste `groupe` : plusieurs groupes partagent parfois un même `label` tout en étant des choix indépendants (masterclass CROPA 2024-2025 : groupes b, c, d libellés « Masterclass »). Les fusionner laisserait croire à un choix unique. Le cas des 9 packs CROPA est traité juste après. --}} @php $labelPrecedent = null; @endphp @foreach ($workshops->groupBy('groupe')->sortBy(fn($rows, $cle) => sprintf('%06d-%s', (int) $rows->min('ordre'), $cle)) as $groupe => $workshopsGroup) @php $workshopsGroup = $workshopsGroup->sortBy('ordre'); // Des groupes de **packs** consécutifs au même en-tête forment // un seul bloc visuel : les 9 packs CROPA sont répartis sur // pack_ven / pack_sam / pack_2j sous « Les Packs du congrès ». // Le choix exclusif n'est pas affecté — le `name` de chaque // radio vient du `groupe` de sa ligne. // // Limité à `f2 = 'pack'` volontairement : d'anciens événements // ont plusieurs groupes indépendants sous un même label (les // masterclass CROPA, groupes b/c/d libellés « Masterclass »), // et les fusionner laisserait croire à un choix unique. $premier = $workshopsGroup->first(); $labelCourant = $premier->label; $repeteLEnTete = $premier->f2 === 'pack' && $labelCourant !== null && $labelCourant !== '' && $labelCourant === $labelPrecedent; $labelPrecedent = $labelCourant; @endphp @if ($workshopsGroup->first()->header_visible == 1 && ! $repeteLEnTete) @endif @foreach ($workshopsGroup as $index => $workshop) @if ($workshop->multi_use) @endif @endforeach @if ($workshopsGroup->first()->show_not_participate_choice) @endif @endforeach
{{ $workshopsGroup->first()->label }} Capacité Disponible Pré-inscrits Validés Présents Prix
@php $flag = $workshop->input == 'radio' ? $workshop->groupe : $workshop->id; if ($workshop->id == '311') { $flag = $workshop->id; } $capacityLeft = $workshop->capacity - $workshop->participants_count; // disable selection when admin set `disable_select` AND there are no places available $flagDisabled = $workshop->disable_select == 1 && $capacityLeft <= 0; // est-ce que le participant a déjà choisi ce workshop ? $isChecked = old( 'workshop.' . $workshop->id, (isset($participant->workshops) && $participant->workshops ->where('workshop_id', $workshop->id) ->first()?->workshop_id == $workshop->id) || $workshop->input_pre_checked == 1, ); @endphp {{-- Le input principal --}} {{-- Si full et déjà sélectionné, on garde une hidden input pour soumettre --}} {{-- @if ($flagDisabled && $isChecked) @endif --}} @if ($workshop->multi_use) @php $totalQty = isset($participant) ? $participant->workshops ->where('workshop_id', $workshop->id) ->count() : 1; if ($totalQty < 1) { $totalQty = 1; } @endphp @endif
{{ $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 }} @if (isset($event) && $event->is_libre_mode) @php $libreDisplayPrice = $storedWorkshopPrices[$workshop->id] ?? $workshop->prix; @endphp TND @else TND @endif
@if ($paimentModes->isNotEmpty())
@foreach ($paimentModes as $paimentMode)
paiement_mode) && $participant->paiement_mode == $paimentMode ? 'checked' : '') }} value="{{ $paimentMode }}" class="form-check-input" type="radio" name="paiement_mode" id="{{ Str::slug($paimentMode) }}" required>
@endforeach
@endif {{-- ===== Dynamic Summary (bottom, auto-updates on selection change) ===== --}} @if (isset($event) && $event->slug === 'stmlnabeul26') @endif
@else @endif