77 lines
3.5 KiB
PHP
77 lines
3.5 KiB
PHP
<x-layout.app>
|
|
<x-card.card class="mx-auto max-w-2xl">
|
|
<x-card.heading>Edit Entry #{{ $entry->id }}</x-card.heading>
|
|
<x-form.form method="PATCH" action="/admin/entries/{{ $entry->id }}">
|
|
<x-form.body-grid columns="6">
|
|
|
|
<x-form.select name="student_id" colspan="4">
|
|
<x-slot:label>Student</x-slot:label>
|
|
@foreach ($students as $student)
|
|
|
|
<option value="{{ $student->id }}" {{ ($student->id == $entry->student_id ? 'selected':'') }}>
|
|
{{ $student->full_name(true) }} - {{ $student->school->name }} (Grade {{ $student->grade }})
|
|
</option>
|
|
|
|
@endforeach
|
|
|
|
</x-form.select><x-form.select name="audition_id" colspan="2">
|
|
<x-slot:label>Audition</x-slot:label>
|
|
@foreach ($auditions as $audition)
|
|
|
|
<option value="{{ $audition->id }}" {{ ($audition->id == $entry->audition_id ? 'selected':'') }}>
|
|
{{ $audition->name }}
|
|
</option>
|
|
@endforeach
|
|
</x-form.select>
|
|
|
|
@if(auditionSetting('advanceTo'))
|
|
<div class="col-span-6 align-top">
|
|
<x-form.checkbox name="for_seating"
|
|
label="Enter for {{ auditionSetting('auditionAbbreviation') }}"
|
|
:checked="$entry->for_seating" />
|
|
</div>
|
|
<div class="col-span-6 align-top">
|
|
<x-form.checkbox name="for_advancement"
|
|
label="Enter for {{ auditionSetting('advanceTo') }}"
|
|
:checked="$entry->for_advancement" />
|
|
</div>
|
|
@else
|
|
<input type="hidden" name="for_seating" value="on">
|
|
@endif
|
|
{{-- TODO need to be able to delete an entry--}}
|
|
</x-form.body-grid>
|
|
<x-form.footer class="!py-5">
|
|
<x-form.button>Edit Entry</x-form.button>
|
|
</x-form.footer>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
|
|
<x-card.card class="mx-auto max-w-2xl mt-6">
|
|
<x-card.heading>Scores</x-card.heading>
|
|
<x-card.list.body>
|
|
@foreach($scores as $score)
|
|
@php($score->isValid())
|
|
<x-card.list.row right_link_button_type="button" >
|
|
<div>{{ $score->judge->full_name() }}</div>
|
|
@foreach($score->subscores as $subscore)
|
|
{{-- TODO make this look better--}}
|
|
<div>
|
|
<p>{{$subscore['subscore_name']}}</p>
|
|
<p>{{$subscore['score'] }}</p>
|
|
</div>
|
|
@endforeach
|
|
@if(! $score->isValid())
|
|
<form method="POST" action="{{ route('scores.destroy',['score'=>$score->id]) }}">
|
|
@csrf
|
|
@method('DELETE')
|
|
<x-slot:right_link_button class="bg-red-500 text-white">INVALID SCORE - DELETE</x-slot:right_link_button>
|
|
@endif
|
|
</x-card.list.row>
|
|
{{-- // TODO make the invalid prettier--}}
|
|
@endforeach
|
|
</x-card.list.body>
|
|
</x-card.card>
|
|
</x-layout.app>
|
|
|
|
{{--TODO apply javascript to only show appropriate auditions for the students grade--}}
|