This commit is contained in:
Martin Quarda 2024-10-06 22:42:05 +02:00
parent a5055ba5a4
commit b17a1e7cd2
3 changed files with 21 additions and 2 deletions

View File

@ -166,7 +166,7 @@ def payment_state(request):
def results(request):
results = []
n = 1
for user in User.objects.filter(alkator_class=1).order_by('duration'):
for user in User.objects.filter(alkator_class=2).order_by('duration'):
if user.alkator_category == 1:
order = f'{n}.'
n += 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

View File

@ -262,7 +262,26 @@ class Main extends Component {
</div>
<div class="col-xl-6">
<h1 class="text" >Výsledky 1. ročníku</h1>
<img src="/public/skore.jpg" style={{"width": "100%", "height":"auto"}} />
{this.state.results &&
<table class="table results">
<thead>
<th>Umístění</th>
<th>Čas</th>
<th>Kategorie</th>
<th>Startovní číslo</th>
</thead>
<tbody>
{this.state.results.map(user =>
<tr>
<th>{user.order}</th>
<td>{user.duration}</td>
<td>{user.alkator_category}</td>
<td>{user.starting_number}</td>
</tr>
)}
</tbody>
</table>
}
{/*
<img src="/public/trasa.png" style={{'width': '100%', 'height': 'auto'}}/>
*/}