Add progress bar to status page
This commit is contained in:
parent
1313252b48
commit
22e56adebe
|
|
@ -1,6 +1,6 @@
|
|||
<x-layout.app>
|
||||
<x-slot:page_title>Audition Status</x-slot:page_title>
|
||||
<x-card.card>
|
||||
<x-card.card class="mx-auto max-w-2xl">
|
||||
<x-card.heading>
|
||||
Auditions
|
||||
</x-card.heading>
|
||||
|
|
@ -8,22 +8,42 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<x-table.th>Audition</x-table.th>
|
||||
<x-table.th>Scoring Status</x-table.th>
|
||||
<x-table.th>Scoring Complete</x-table.th>
|
||||
<x-table.th>Seats Published</x-table.th>
|
||||
</tr>
|
||||
</thead>
|
||||
<x-table.body>
|
||||
@foreach($auditions as $audition)
|
||||
<tr>
|
||||
<x-table.td><a href="/tabulation/auditions/{{ $audition->id }}">
|
||||
{{ $audition->name }}
|
||||
</a></x-table.td>
|
||||
<x-table.td>{{ $audition->scored_entries_count }} / {{ $audition->entries_count }} Scored</x-table.td>
|
||||
<td>
|
||||
@if( $audition->scored_entries_count == $audition->entries_count)
|
||||
<x-icons.checkmark color="green"/>
|
||||
@endif
|
||||
</td>
|
||||
@php
|
||||
if($audition->entries_count > 0) {
|
||||
$percent = round(($audition->scored_entries_count / $audition->entries_count) * 100);
|
||||
|
||||
}
|
||||
@endphp
|
||||
<tr class="hover:bg-gray-50">
|
||||
|
||||
<x-table.td class="">
|
||||
<a href="/tabulation/auditions/{{ $audition->id }}">
|
||||
{{-- {{ $audition->scored_entries_count }} / {{ $audition->entries_count }} Scored--}}
|
||||
<div class="flex justify-between mb-1">
|
||||
<span class="text-base font-medium text-indigo-700 dark:text-white">{{ $audition->name }}</span>
|
||||
<span class="text-sm font-medium text-indigo-700 dark:text-white">{{ $audition->scored_entries_count }} / {{ $audition->entries_count }} Scored</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2.5 dark:bg-gray-700">
|
||||
<div class="bg-indigo-600 h-2.5 rounded-full" style="width: {{ $percent }}%"></div>
|
||||
</div>
|
||||
</a>
|
||||
</x-table.td>
|
||||
<td class="px-8">
|
||||
@if( $audition->scored_entries_count == $audition->entries_count)
|
||||
<x-icons.checkmark color="green"/>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if( $audition->hasFlag('seats_published'))
|
||||
<x-icons.checkmark color="green"/>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</x-table.body>
|
||||
|
|
|
|||
Loading…
Reference in New Issue