127 lines
7.3 KiB
PHP
127 lines
7.3 KiB
PHP
<x-layout.app>
|
|
<x-slot:page_title>Entry Administration</x-slot:page_title>
|
|
|
|
{{-- Filter Control--}}
|
|
<x-card.card>
|
|
<x-card.heading>Set Filters</x-card.heading>
|
|
<x-form.form action="{{ route('admin_entry_filter.set') }}" method="POST">
|
|
<x-form.body-grid columns="12">
|
|
<x-form.field name="id_filter" label_text="Entry ID" colspan="2" value="{{ $filters['id'] ?? '' }}"/>
|
|
<x-form.select name="audition_filter" colspan="4">
|
|
<x-slot:label>Audition</x-slot:label>
|
|
<option value="">No Audition Filter</option>
|
|
@foreach($auditions as $audition)
|
|
<option value="{{ $audition->id }}" {{ ($filters['audition'] ?? null) == $audition->id ? 'SELECTED':'' }}>
|
|
{{ $audition->name }}
|
|
</option>
|
|
@endforeach
|
|
</x-form.select>
|
|
<x-form.select name="school_filter" colspan="4">
|
|
<x-slot:label>School</x-slot:label>
|
|
<option value="">No School Filter</option>
|
|
@foreach($schools as $school)
|
|
<option value="{{ $school->id }}" {{ ($filters['school'] ?? null) == $school->id ? 'SELECTED':'' }}>
|
|
{{ $school->name }}
|
|
</option>
|
|
@endforeach
|
|
</x-form.select>
|
|
<x-form.select name="grade_filter" colspan="2">
|
|
<x-slot:label>Grade</x-slot:label>
|
|
<option value="">No Grade Filter</option>
|
|
@php($n = $minGrade)
|
|
@while($n <= $maxGrade)
|
|
<option value="{{ $n }}" {{ ($filters['grade'] ?? null) == $n ? 'SELECTED':'' }}>
|
|
{{ $n }}
|
|
</option>
|
|
@php($n++);
|
|
@endwhile
|
|
</x-form.select>
|
|
<x-form.field name="first_name_filter" colspan="4" label_text="First Name" value="{{ ($filters['first_name'] ?? null) }}"/>
|
|
<x-form.field name="last_name_filter" colspan="4" label_text="Last Name" value="{{ ($filters['last_name'] ?? null) }}"/>
|
|
@if(auditionSetting('advanceTo'))
|
|
<x-form.select name="entry_type_filter" colspan="2">
|
|
<x-slot:label>Entry Type</x-slot:label>
|
|
<option value="all" {{ ($filters['entry_type'] ?? null) == 'all' ? 'SELECTED':'' }}>All</option>
|
|
<option value="seats" {{ ($filters['entry_type'] ?? null) == 'seats' ? 'SELECTED':'' }}>{{ auditionSetting('auditionAbbreviation') }}</option>
|
|
<option value="advancement" {{ ($filters['entry_type'] ?? null) == 'advancement' ? 'SELECTED':'' }}>{{ auditionSetting('advanceTo') }}</option>
|
|
<option value="seatsOnly" {{ ($filters['entry_type'] ?? null) == 'seatsOnly' ? 'SELECTED':'' }}>ONLY {{ auditionSetting('auditionAbbreviation') }}</option>
|
|
<option value="advancementOnly" {{ ($filters['entry_type'] ?? null) == 'advancementOnly' ? 'SELECTED':'' }}>ONLY {{ auditionSetting('advanceTo') }}</option>
|
|
</x-form.select>
|
|
@endif
|
|
<x-form.select name="entries_per_page_filter" colspan="2">
|
|
<x-slot:label>Entries Per Page</x-slot:label>
|
|
<option value="10" {{ ($filters['entries_per_page'] ?? null) == '10' ? 'SELECTED':'' }}>10</option>
|
|
<option value="25" {{ ($filters['entries_per_page'] ?? null) == '25' ? 'SELECTED':'' }}>25</option>
|
|
<option value="50" {{ ($filters['entries_per_page'] ?? null) == '50' ? 'SELECTED':'' }}>50</option>
|
|
<option value="100" {{ ($filters['entries_per_page'] ?? null) == '100' ? 'SELECTED':'' }}>100</option>
|
|
<option value="10000" {{ ($filters['entries_per_page'] ?? null) == '10000' ? 'SELECTED':'' }}>All</option>
|
|
</x-form.select>
|
|
</x-form.body-grid>
|
|
<x-form.footer class="pb-4">
|
|
<x-form.button-nocolor href="{{ route('admin_entry_filter.clear') }}">Clear Filters</x-form.button-nocolor>
|
|
<x-form.button>Apply Filters</x-form.button>
|
|
</x-form.footer>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
|
|
{{--Entries Table--}}
|
|
<x-card.card class="mt-4">
|
|
<x-table.table with_title_area>
|
|
<x-slot:title class="ml-3">Entries</x-slot:title>
|
|
<x-slot:subtitle class="ml-3">Double click row to edit</x-slot:subtitle>
|
|
<x-slot:title_block_right class="mr-3">
|
|
<x-form.button href="{{ route('admin.entries.create') }}">New Entry</x-form.button>
|
|
</x-slot:title_block_right>
|
|
|
|
<thead>
|
|
<tr>
|
|
<x-table.th>ID</x-table.th>
|
|
<x-table.th>Audition</x-table.th>
|
|
<x-table.th>Draw #</x-table.th>
|
|
<x-table.th>Student</x-table.th>
|
|
<x-table.th>Grade</x-table.th>
|
|
<x-table.th>School</x-table.th>
|
|
@if(auditionSetting('advanceTo'))
|
|
<x-table.th>{{ auditionSetting('auditionAbbreviation') }}</x-table.th>
|
|
<x-table.th>{{ auditionSetting('advanceTo') }}</x-table.th>
|
|
@endif
|
|
<x-table.th>Entry Date</x-table.th>
|
|
</tr>
|
|
</thead>
|
|
<x-table.body>
|
|
@foreach($entries as $entry)
|
|
<tr @dblclick="window.location.href='{{ route('admin.entries.edit', ['entry' => $entry->id]) }}'">
|
|
<x-table.td><a href="/admin/entries/{{ $entry->id }}/edit"> {{ $entry->id }} </a></x-table.td>
|
|
<x-table.td>{{ $entry->audition->name }}</x-table.td>
|
|
<x-table.td>{{ $entry->draw_number }}</x-table.td>
|
|
<x-table.td>{{ $entry->student->full_name() }}</x-table.td>
|
|
<x-table.td>{{ $entry->student->grade }}</x-table.td>
|
|
<x-table.td>{{ $entry->student->school->name }}</x-table.td>
|
|
@if(auditionSetting('advanceTo'))
|
|
<x-table.td>
|
|
@if($entry->for_seating)
|
|
<x-icons.checkmark color="green" />
|
|
@else
|
|
<x-icons.circle-slash-no color="red" />
|
|
@endif
|
|
</x-table.td>
|
|
<x-table.td>
|
|
@if($entry->for_advancement)
|
|
<x-icons.checkmark color="green" />
|
|
@else
|
|
<x-icons.circle-slash-no color="red" />
|
|
@endif
|
|
</x-table.td>
|
|
@endif
|
|
<x-table.td>{{ $entry->created_at->setTimezone('America/Chicago')->format('m/d/Y g:i A') }}</x-table.td>
|
|
</tr>
|
|
@endforeach
|
|
</x-table.body>
|
|
</x-table.table>
|
|
|
|
</x-card.card>
|
|
<div class="mt-3 mx-3">
|
|
{{ $entries->links('vendor.pagination.simple-audition') }}
|
|
</div>
|
|
</x-layout.app>
|