1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 12:38:26 +02:00

Display payments in team detail view

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-02-21 23:41:31 +01:00
parent 54dafe1cec
commit 64b91cf7e0
3 changed files with 96 additions and 47 deletions

View File

@ -112,7 +112,6 @@
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadMotivationLetterModal">{% trans "Replace" %}</button>
{% endif %}
</dd>
</dl>
{% if user.registration.is_volunteer %}
{% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %}
@ -123,6 +122,30 @@
</div>
{% endif %}
{% endif %}
{% if team.participation.valid %}
<hr class="my-3">
{% for student in team.students.all %}
{% for payment in student.payments.all %}
<dt class="col-sm-6 text-end">
{% trans "Payment of" %} {{ student }}
{% if payment.grouped %}({% trans "grouped" %}){% endif %}
{% if payment.final %} ({% trans "final" %}){% endif %} :
</dt>
<dd class="col-sm-6">
Valide : {{ payment.valid|yesno }}
{% if payment.valid is False %}
{% if user.registration in payment.registrations.all or user.registration.is_coach or user.registration.is_volunteer %}
<a href="{% url "registration:update_payment" pk=payment.pk %}" class="btn btn-secondary">
<i class="fas fa-money-bill-wave"></i> {% trans "Update payment" %}
</a>
{% endif %}
{% endif %}
</dd>
{% endfor %}
{% endfor %}
{% endif %}
</dl>
</div>
<div class="card-footer text-center">
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamModal">{% trans "Update" %}</button>