67 lines
3.0 KiB
PHP
67 lines
3.0 KiB
PHP
<x-layout.app x-data="{ showButton: {{ $scores ? 'false':'true' }} }">
|
|
@if($scores)
|
|
<x-card.card class="mx-auto max-w-2xl mb-3">
|
|
<x-card.heading class="text-red-600">
|
|
WARNING: Entry has existing scores
|
|
</x-card.heading>
|
|
<div class="grid md:grid-cols-3 px-4 space-x-3 pb-6">
|
|
@foreach($scores as $score)
|
|
<div>
|
|
<div class="my-3 border-b">{{ $score->judge->full_name() }}</div>
|
|
<ul>
|
|
@foreach($score->subscores as $subscore)
|
|
<div class="grid grid-cols-2 gap-x-8 border-b">
|
|
<span>{{ $subscore['subscore_name'] }}</span>
|
|
<span>{{ $subscore['score'] }}</span>
|
|
</div>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
<div class="pb-5 pl-5 flex gap-1">
|
|
<x-form.checkbox name="confirm" x-model="showButton"/>
|
|
I understand that marking this entry as a no-show will delete existing scores. The scores cannot be
|
|
recovered.
|
|
</div>
|
|
</x-card.card>
|
|
@endif
|
|
<x-card.card class="mx-auto max-w-md" x-show="showButton" x-cloak x-data="{ selected: 'noshow' }">
|
|
<x-card.heading>
|
|
@if($method !== "DELETE")
|
|
<span x-text="selected === 'noshow' ? 'Confirm No Show' : 'Confirm Fail Prelim'"></span>
|
|
@else
|
|
{{ $buttonName }}
|
|
@endif
|
|
|
|
|
|
</x-card.heading>
|
|
<x-card.list.body>
|
|
<x-card.list.row>
|
|
{{ $entry->student->full_name() }}
|
|
<x-card.list.row-text-subtext>{{$entry->school->name}}</x-card.list.row-text-subtext>
|
|
</x-card.list.row>
|
|
<x-card.list.row>
|
|
{{ $entry->audition->name }} #{{ $entry->draw_number ?? ' no draw number' }}
|
|
</x-card.list.row>
|
|
</x-card.list.body>
|
|
<x-form.form method="{{ $method }}" action="{{route($submitRouteName, $entry)}}" id="{{ $formId }}" >
|
|
<x-form.footer class="mb-4">
|
|
@if($buttonName == "Confirm No Show")
|
|
<x-form.option name="noshow-type" value="noshow" id="noshowoption" option_text="No-Show" checked x-on:click="selected = 'noshow'" />
|
|
<x-form.option name="noshow-type" value="failprelim" id="failprelimoption" option_text="Fail Prelim" x-on:click="selected = 'failprelim'"/>
|
|
@endif
|
|
|
|
<x-form.button type="submit">
|
|
@if($method !== "DELETE")
|
|
<span x-text="selected === 'noshow' ? 'Confirm No Show' : 'Confirm Fail Prelim'"></span>
|
|
@else
|
|
{{ $buttonName }}
|
|
@endif
|
|
|
|
</x-form.button>
|
|
</x-form.footer>
|
|
</x-form.form>
|
|
</x-card.card>
|
|
</x-layout.app>
|