98 lines
4.2 KiB
PHP
98 lines
4.2 KiB
PHP
<x-layout.app>
|
|
|
|
<x-slot:page_title>Nomination Administration</x-slot:page_title>
|
|
<x-card.card class="mb-3">
|
|
<x-card.heading>Filters</x-card.heading>
|
|
<x-form.form method="GET" action="{{route('nomination.admin.index')}}">
|
|
<input type="hidden" name="newFilterParameters" value="true">
|
|
<x-form.body-grid class="my-2">
|
|
<x-form.select name="school" onchange="this.form.submit()">
|
|
|
|
<x-slot:label>School</x-slot:label>
|
|
<option value="">All</option>
|
|
@foreach($schools as $school)
|
|
<option value="{{ $school->id }}"
|
|
@if($school->id == ($filterData['school'] ?? null)) SELECTED @endif>
|
|
{{ $school->name }}
|
|
</option>
|
|
@endforeach
|
|
</x-form.select>
|
|
|
|
<x-form.select name="section" onchange="this.form.submit()" colspan="2">
|
|
<x-slot:label>Ensemble / Instrument</x-slot:label>
|
|
<option value="">All</option>
|
|
@foreach ($sections as $value => $name)
|
|
<option value="{{$value}}"
|
|
@if($value == ($filterData['section'] ?? null)) SELECTED @endif>
|
|
{{$name}}</option>
|
|
@endforeach
|
|
</x-form.select>
|
|
|
|
<x-form.select name="split" onchange="this.form.submit()" colspan="2">
|
|
<x-slot:label>Split</x-slot:label>
|
|
<option value="">All</option>
|
|
<option value="NO-SPLIT-ASSIGNED"
|
|
@if($filterData['split'] ?? null == 'NO-SPLIT-ASSIGNED') SELECTED @endif>
|
|
No Split Assigned
|
|
</option>
|
|
@foreach ($splits as $value => $name)
|
|
<option value="{{$value}}"
|
|
@if($value == ($filterData['split'] ?? null)) SELECTED @endif>
|
|
{{$name}}</option>
|
|
@endforeach
|
|
</x-form.select>
|
|
|
|
<div class="align-bottom">
|
|
<p> </p>
|
|
<x-form.button value="clear" name="clear">Clear Filters</x-form.button>
|
|
</div>
|
|
|
|
|
|
</x-form.body-grid>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
|
|
<x-form.button class="mb-3" href="{{ route('nomination.admin.create') }}">Add Nomination</x-form.button>
|
|
|
|
|
|
<div class="px-3">
|
|
{{ $nominations->onEachSide(3)->links() }}
|
|
</div>
|
|
<x-card.card class="mt-3">
|
|
<x-card.heading>Nominations</x-card.heading>
|
|
<x-table.table id="nominationTable">
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>Nom ID</x-table.th>
|
|
<x-table.th>Name</x-table.th>
|
|
<x-table.th>School</x-table.th>
|
|
<x-table.th>Nominated For</x-table.th>
|
|
<x-table.th>Split</x-table.th>
|
|
<x-table.th>Seat</x-table.th>
|
|
<x-table.th></x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<x-table.body>
|
|
@foreach($nominations as $nomination)
|
|
<tr>
|
|
<x-table.td>{{ $nomination->id }}</x-table.td>
|
|
<x-table.td>{{ $nomination->student->full_name('fl') }}</x-table.td>
|
|
<x-table.td>{{ $nomination->student->school->name }}</x-table.td>
|
|
<x-table.td>{{ $nomination->ensemble->name }}
|
|
- {{ $nomination->data['instrument'] }}</x-table.td>
|
|
<x-table.td>{{ $nomination->data['split'] ?? '---' }}</x-table.td>
|
|
<x-table.td>{{ $nomination->data['seat'] ?? '---' }}</x-table.td>
|
|
<x-table.td>
|
|
<a href="{{ route('nomination.admin.edit',[$nomination]) }}">
|
|
[ EDIT ]
|
|
</a>
|
|
</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</x-table.body>
|
|
</x-table.table>
|
|
</x-card.card>
|
|
|
|
|
|
</x-layout.app>
|