@if (!$event->is_quick_mode)
| {{ $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
|
@if ($workshop->capacity - $workshop->participants_count > 0) @else @endif | @if ($workshop->participants_count <= $workshop->capacity) @else @endif | @if (isset($event) && $event->is_libre_mode) @php $libreDisplayPrice = $storedWorkshopPrices[$workshop->id] ?? $workshop->prix; @endphp TND @else TND @endif | |||
|
|
||||||