Advancement tabulation #3
|
|
@ -1,43 +1,45 @@
|
|||
<x-layout.app>
|
||||
<x-slot:page_title>{{ auditionSetting('advanceTo') }} Advancement - {{ $audition->name }}</x-slot:page_title>
|
||||
<div class="grid grid-cols-4" x-data="checkboxSelector()">
|
||||
<div class="col-span-3">
|
||||
@include('tabulation.advancement.results-table')
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
@if($scoringComplete)
|
||||
<x-form.form method="POST" action="#">
|
||||
<div class="grid grid-cols-4" x-data="checkboxSelector()">
|
||||
<div class="col-span-3">
|
||||
@include('tabulation.advancement.results-table')
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
@if($scoringComplete)
|
||||
|
||||
<x-card.card>
|
||||
<x-card.heading>Pass Entries</x-card.heading>
|
||||
<div class="mx-6 mt-3">
|
||||
<x-form.field name="markrows"
|
||||
type="number"
|
||||
label_text="Mark entries ranked 1 through"
|
||||
x-model="numberOfCheckboxes"/>
|
||||
<x-card.card>
|
||||
<x-card.heading>Pass Entries</x-card.heading>
|
||||
<div class="mx-6 mt-3">
|
||||
<x-form.field name="markrows"
|
||||
type="number"
|
||||
label_text="Mark entries ranked 1 through"
|
||||
x-model="numberOfCheckboxes"/>
|
||||
|
||||
<div class="flex justify-between mb-3">
|
||||
<div></div>
|
||||
<x-form.button type="button" class="mt-2" @click="checkCheckboxes">Mark</x-form.button>
|
||||
<div class="flex justify-between mb-3">
|
||||
<div></div>
|
||||
<x-form.button type="button" class="mt-2" @click="checkCheckboxes">Mark</x-form.button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-card.card>
|
||||
@endif
|
||||
</div>
|
||||
</x-card.card>
|
||||
|
||||
<script>
|
||||
function checkboxSelector() {
|
||||
return {
|
||||
numberOfCheckboxes: 0,
|
||||
checkCheckboxes() {
|
||||
const checkboxes = document.querySelectorAll('.checkbox');
|
||||
checkboxes.forEach((checkbox, index) => {
|
||||
checkbox.checked = index < this.numberOfCheckboxes;
|
||||
});
|
||||
<x-form.button type="submit" class="mt-3">Pass Checked Entries</x-form.button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function checkboxSelector() {
|
||||
return {
|
||||
numberOfCheckboxes: 0,
|
||||
checkCheckboxes() {
|
||||
const checkboxes = document.querySelectorAll('.checkbox');
|
||||
checkboxes.forEach((checkbox, index) => {
|
||||
checkbox.checked = index < this.numberOfCheckboxes;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</x-form.form>
|
||||
</x-layout.app>
|
||||
|
|
|
|||
Loading…
Reference in New Issue