auditionadmin/resources/views/doubler_request/index.blade.php

39 lines
1.8 KiB
PHP

<x-layout.app>
<x-slot:page_title>Doubler Requests</x-slot:page_title>
<x-form.form method="POST" action="{{route('doubler_request.make_request')}}">
@foreach($events as $event)
<x-card.card class="mb-5">
<x-card.heading>{{ $event->name }}</x-card.heading>
<x-table.table>
<thead>
<tr>
<x-table.th>Student Name</x-table.th>
<x-table.th>Entries</x-table.th>
<x-table.th>Request</x-table.th>
</tr>
</thead>
<x-table.body>
@foreach($doublers[$event->id] ?? [] as $doubler)
@php($student = $doubler->student)
<tr>
<x-table.td>{{ $student->full_name() }}</x-table.td>
<x-table.td>
@foreach($doubler->entries() as $entry)
<p>{{ $entry->audition->name }}</p>
@endforeach
</x-table.td>
<x-table.td>
<x-form.field
value="{{ $existingRequests[$event->id][$student->id]['request'] ?? '' }}"
name="doubler_requests[{{$event->id}}][{{$student->id}}]"/>
</x-table.td>
</tr>
@endforeach
</x-table.body>
</x-table.table>
</x-card.card>
@endforeach
<x-form.button type="submit">Save Doubler Requests</x-form.button>
</x-form.form>
</x-layout.app>