47 lines
2.1 KiB
PHP
47 lines
2.1 KiB
PHP
<x-layout.app>
|
|
<x-slot:page_title>Doubler Requests</x-slot:page_title>
|
|
@foreach($errors->all() as $error)
|
|
<span
|
|
class="inline-flex items-center rounded-md bg-red-50 px-2 py-1 text-xs font-medium text-red-700 inset-ring inset-ring-red-600/10 dark:bg-red-400/10 dark:text-red-400 dark:inset-ring-red-400/20">
|
|
{{ $error }}
|
|
</span>
|
|
|
|
@endforeach
|
|
<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>
|