39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
@php
|
|
$seatingProposal = [];
|
|
@endphp
|
|
|
|
@foreach($rightPanel['data'] as $ensembleLimit)
|
|
<x-card.card class="mb-3">
|
|
<x-card.heading>{{ $ensembleLimit['ensemble']->name }} - DRAFT</x-card.heading>
|
|
<x-card.list.body>
|
|
@php
|
|
// $maxAccepted = $requestedEnsembleAccepts[$ensembleLimit->ensemble->id] ?? $ensembleLimit->maximum_accepted;
|
|
$maxAccepted = $ensembleLimit['limit'];
|
|
@endphp
|
|
@for($n=1; $n <= $maxAccepted; $n++)
|
|
@php
|
|
$entry = $seatableEntries->shift();
|
|
if (is_null($entry)) continue;
|
|
$seatingProposal[] = [
|
|
'ensemble_id' => $ensembleLimit['ensemble']->id,
|
|
'audition_id' => $audition->id,
|
|
'seat' => $n,
|
|
'entry_id' => $entry->id,
|
|
];
|
|
@endphp
|
|
|
|
<x-card.list.row class="!py-2">
|
|
{{ $n }} - {{ $entry->student->full_name() }}
|
|
</x-card.list.row>
|
|
@endfor
|
|
</x-card.list.body>
|
|
</x-card.card>
|
|
@endforeach
|
|
<form method="POST" action="{{ route('tabulation.seat.publish',['audition' => $audition]) }}">
|
|
@csrf
|
|
<x-form.button type="submit">Seat and Publish</x-form.button>
|
|
</form>
|
|
@php
|
|
session(['audition' . $audition->id . 'seatingProposal' => $seatingProposal]);
|
|
@endphp
|