Update chrono add and list management

This commit is contained in:
Gregory Trullemans 2024-04-11 16:29:15 +02:00
parent 514807204a
commit c3d34fe174
2 changed files with 57 additions and 57 deletions

View File

@ -24,7 +24,6 @@
</div>
</div>
<div class="card-body vh-100">
<div class="table-responsive">
{% if gymnast %}
<div class="row">
<div class="col-md-6">
@ -75,12 +74,13 @@
</tbody>
</table>
</div>
<div class="col-md-6">
<canvas id="chart_chrono" class="chartjs" width="400" height="200"></canvas>
<div class="col-md-6 pl-0 pr-0">
<canvas id="chart_chrono" class="chartjs" width="100%"></canvas>
</div>
</div>
{% else %}
{% if chrono_list %}
<div class="table-responsive">
<table class="table table-striped tablesorter" id="chrono_table">
<thead>
<tr>
@ -128,8 +128,8 @@
{% else %}
<p class="text-muted">There are no chronos corresponding to your criterias.</p>
{% endif %}
{% endif %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -476,7 +476,7 @@ def chrono_create_or_update(request, chrono_id=None, gymnast_id=None):
)
return HttpResponseRedirect(
reverse("gymnast_details_tab", args=(new_chrono.gymnast.id, "scores"))
reverse("chrono_list_for_gymnast", args=(new_chrono.gymnast.id,))
)
return render(request, "chronos/create.html", {"form": form})