@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;
$flagDisabled = $capacityLeft <= 0;
$flagDisabled = false;
// 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 | TND | |||
|
|
||||||