From 64b91cf7e0df7a3ae968eb6225fe9a76be155f88 Mon Sep 17 00:00:00 2001
From: Emmy D'Anello
Date: Wed, 21 Feb 2024 23:41:31 +0100
Subject: [PATCH] Display payments in team detail view
Signed-off-by: Emmy D'Anello
---
locale/fr/LC_MESSAGES/django.po | 105 ++++++++++--------
.../templates/participation/team_detail.html | 25 ++++-
.../templates/registration/payment_form.html | 13 +++
3 files changed, 96 insertions(+), 47 deletions(-)
diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po
index ce85544..00e1222 100644
--- a/locale/fr/LC_MESSAGES/django.po
+++ b/locale/fr/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2024-02-21 23:10+0100\n"
+"POT-Creation-Date: 2024-02-21 23:41+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello \n"
"Language-Team: LANGUAGE \n"
@@ -30,6 +30,7 @@ msgstr "équipes"
#: participation/admin.py:16 participation/admin.py:73
#: participation/admin.py:104 participation/models.py:419
#: participation/models.py:443 participation/models.py:513
+#: registration/templates/registration/payment_form.html:51
msgid "tournament"
msgstr "tournoi"
@@ -327,6 +328,7 @@ msgstr "Continuer le tirage"
#: draw/templates/draw/tournament_content.html:216 participation/admin.py:100
#: participation/models.py:249 participation/models.py:434
#: registration/models.py:156
+#: registration/templates/registration/payment_form.html:50
msgid "team"
msgstr "équipe"
@@ -782,6 +784,7 @@ msgid "organizers"
msgstr "organisateur⋅rices"
#: participation/models.py:336
+#: participation/templates/participation/team_detail.html:133
msgid "final"
msgstr "finale"
@@ -1085,8 +1088,8 @@ msgstr "Rejoindre"
#: participation/templates/participation/pool_detail.html:110
#: participation/templates/participation/pool_detail.html:128
#: participation/templates/participation/pool_detail.html:133
-#: participation/templates/participation/team_detail.html:128
-#: participation/templates/participation/team_detail.html:192
+#: participation/templates/participation/team_detail.html:151
+#: participation/templates/participation/team_detail.html:215
#: participation/templates/participation/tournament_form.html:12
#: participation/templates/participation/update_team.html:12
#: registration/templates/registration/update_user.html:16
@@ -1147,7 +1150,7 @@ msgstr "Envoyer une solution"
#: participation/templates/participation/participation_detail.html:59
#: participation/templates/participation/passage_detail.html:132
#: participation/templates/participation/pool_detail.html:138
-#: participation/templates/participation/team_detail.html:187
+#: participation/templates/participation/team_detail.html:210
#: participation/templates/participation/upload_motivation_letter.html:13
#: participation/templates/participation/upload_notes.html:17
#: participation/templates/participation/upload_solution.html:11
@@ -1439,21 +1442,36 @@ msgstr "Télécharger"
msgid "Replace"
msgstr "Remplacer"
-#: participation/templates/participation/team_detail.html:121
+#: participation/templates/participation/team_detail.html:120
msgid "Download all submitted authorizations"
msgstr "Télécharger toutes les autorisations soumises"
-#: participation/templates/participation/team_detail.html:130
-#: participation/templates/participation/team_detail.html:197
+#: participation/templates/participation/team_detail.html:131
+msgid "Payment of"
+msgstr "Paiement de"
+
+#: participation/templates/participation/team_detail.html:132
+#: registration/models.py:521
+msgid "grouped"
+msgstr "groupé"
+
+#: participation/templates/participation/team_detail.html:140
+#: registration/templates/registration/user_detail.html:163
+#: registration/views.py:461
+msgid "Update payment"
+msgstr "Mettre à jour le paiement"
+
+#: participation/templates/participation/team_detail.html:153
+#: participation/templates/participation/team_detail.html:220
#: participation/templates/participation/team_leave.html:11
msgid "Leave"
msgstr "Quitter"
-#: participation/templates/participation/team_detail.html:140
+#: participation/templates/participation/team_detail.html:163
msgid "Access to team participation"
msgstr "Accéder à la participation de l'équipe"
-#: participation/templates/participation/team_detail.html:147
+#: participation/templates/participation/team_detail.html:170
msgid ""
"Your team has at least 4 members and a coach and all authorizations were "
"given: the team can be validated."
@@ -1461,11 +1479,11 @@ msgstr ""
"Votre équipe contient au moins 4 personnes et un⋅e encadrant⋅e et toutes les "
"autorisations ont été données : l'équipe peut être validée."
-#: participation/templates/participation/team_detail.html:152
+#: participation/templates/participation/team_detail.html:175
msgid "Submit my team to validation"
msgstr "Soumettre mon équipe à validation"
-#: participation/templates/participation/team_detail.html:158
+#: participation/templates/participation/team_detail.html:181
msgid ""
"Your team must be composed of 4 members and a coach and each member must "
"upload their authorizations and confirm its email address."
@@ -1473,15 +1491,15 @@ msgstr ""
"Votre équipe doit être composée d'au moins 4 membres et un⋅e encadrant⋅e et "
"chaque membre doit envoyer ses autorisations et confirmé son adresse e-mail."
-#: participation/templates/participation/team_detail.html:163
+#: participation/templates/participation/team_detail.html:186
msgid "This team didn't ask for validation yet."
msgstr "L'équipe n'a pas encore demandé à être validée."
-#: participation/templates/participation/team_detail.html:169
+#: participation/templates/participation/team_detail.html:192
msgid "Your validation is pending."
msgstr "Votre validation est en attente."
-#: participation/templates/participation/team_detail.html:173
+#: participation/templates/participation/team_detail.html:196
msgid ""
"The team requested to be validated. You may now control the authorizations "
"and confirm that they can participate."
@@ -1489,24 +1507,24 @@ msgstr ""
"L'équipe a demandé à être validée. Vous pouvez désormais contrôler les "
"différentes autorisations et confirmer qu'elle peut participer."
-#: participation/templates/participation/team_detail.html:179
+#: participation/templates/participation/team_detail.html:202
msgid "Validate"
msgstr "Valider"
-#: participation/templates/participation/team_detail.html:180
+#: participation/templates/participation/team_detail.html:203
msgid "Invalidate"
msgstr "Invalider"
-#: participation/templates/participation/team_detail.html:186
+#: participation/templates/participation/team_detail.html:209
#: participation/views.py:329
msgid "Upload motivation letter"
msgstr "Envoyer la lettre de motivation"
-#: participation/templates/participation/team_detail.html:191
+#: participation/templates/participation/team_detail.html:214
msgid "Update team"
msgstr "Modifier l'équipe"
-#: participation/templates/participation/team_detail.html:196
+#: participation/templates/participation/team_detail.html:219
#: participation/views.py:438
msgid "Leave team"
msgstr "Quitter l'équipe"
@@ -1848,7 +1866,7 @@ msgid "Male"
msgstr "Homme"
#: registration/models.py:165
-#: registration/templates/registration/payment_form.html:74
+#: registration/templates/registration/payment_form.html:87
msgid "Other"
msgstr "Autre"
@@ -2131,10 +2149,6 @@ msgstr "inscription de bénévole"
msgid "volunteer registrations"
msgstr "inscriptions de bénévoles"
-#: registration/models.py:521
-msgid "grouped"
-msgstr "groupé"
-
#: registration/models.py:523
msgid ""
"If set to true, then one payment is made for the full team, for example if "
@@ -2172,7 +2186,7 @@ msgid "No payment"
msgstr "Pas de paiement"
#: registration/models.py:550
-#: registration/templates/registration/payment_form.html:57
+#: registration/templates/registration/payment_form.html:70
msgid "Credit card"
msgstr "Carte bancaire"
@@ -2181,7 +2195,7 @@ msgid "Scholarship"
msgstr "Notification de bourse"
#: registration/models.py:552
-#: registration/templates/registration/payment_form.html:62
+#: registration/templates/registration/payment_form.html:75
msgid "Bank transfer"
msgstr "Virement bancaire"
@@ -2441,11 +2455,15 @@ msgstr ""
msgid "Group the payments of my team"
msgstr "Regrouper les paiements de mon équipe"
-#: registration/templates/registration/payment_form.html:68
+#: registration/templates/registration/payment_form.html:53
+msgid "Concerned students"
+msgstr "Élèves concerné⋅es"
+
+#: registration/templates/registration/payment_form.html:81
msgid "I have a scholarship"
msgstr "J'ai une bourse"
-#: registration/templates/registration/payment_form.html:84
+#: registration/templates/registration/payment_form.html:97
msgid ""
"The payment by credit card is made via Hello Asso. To do this, you can click "
"on the button below, which will redirect you to the secure payment page of "
@@ -2457,11 +2475,11 @@ msgstr ""
"paiement sécurisée de Hello Asso. La validation du paiement se fera alors "
"automatiquement, dans quelques minutes."
-#: registration/templates/registration/payment_form.html:93
+#: registration/templates/registration/payment_form.html:106
msgid "Go to the Hello Asso page"
msgstr "Aller à la page Hello Asso"
-#: registration/templates/registration/payment_form.html:98
+#: registration/templates/registration/payment_form.html:111
msgid ""
"If a third party must pay for you (parents, school,…), you can send them the "
"link to pay for you:"
@@ -2469,11 +2487,11 @@ msgstr ""
"Si un tiers doit payer pour vous (parents, école, …), vous pouvez leur "
"envoyer le lien pour payer pour vous :"
-#: registration/templates/registration/payment_form.html:108
+#: registration/templates/registration/payment_form.html:121
msgid "Copied!"
msgstr "Copié !"
-#: registration/templates/registration/payment_form.html:115
+#: registration/templates/registration/payment_form.html:128
msgid ""
"If this is the case and if an invoice is necessary, please contact the "
"tournament organizers by providing the name of the team, the number of "
@@ -2485,7 +2503,7 @@ msgstr ""
"de participant⋅es, le nom de l'établissement payeur, l'adresse mail de "
"l'établissement et/ou l'adresse mail du gestionnaire de l'établissement."
-#: registration/templates/registration/payment_form.html:126
+#: registration/templates/registration/payment_form.html:139
msgid ""
"You can also pay by bank transfer. To do this, you must put in the reference "
"of the transfer \"TFJMpu\" followed by the last name and the first name of "
@@ -2495,11 +2513,11 @@ msgstr ""
"mettre en référence du virement « TFJMpu » suivi du nom et du prénom de "
"l'élève."
-#: registration/templates/registration/payment_form.html:132
+#: registration/templates/registration/payment_form.html:145
msgid "The bank details are as follows:"
msgstr "Les coordonnées bancaires sont les suivantes :"
-#: registration/templates/registration/payment_form.html:143
+#: registration/templates/registration/payment_form.html:156
msgid ""
"Once your payment done, please send us a proof of your transfer using the "
"below form. The validation of your payment will then be done manually, "
@@ -2509,13 +2527,13 @@ msgstr ""
"votre virement en utilisant le formulaire ci-dessous. La validation de votre "
"paiement se fera alors manuellement, sous quelques jours."
-#: registration/templates/registration/payment_form.html:152
-#: registration/templates/registration/payment_form.html:167
-#: registration/templates/registration/payment_form.html:182
+#: registration/templates/registration/payment_form.html:165
+#: registration/templates/registration/payment_form.html:180
+#: registration/templates/registration/payment_form.html:195
msgid "Submit"
-msgstr ""
+msgstr "Envoyer"
-#: registration/templates/registration/payment_form.html:158
+#: registration/templates/registration/payment_form.html:171
msgid ""
"The tournament is free for you if you have a scholarship. However, you must "
"send us a proof of your scholarship. You can do this using the below form."
@@ -2524,7 +2542,7 @@ msgstr ""
"devez nous envoyer un justificatif de votre bourse. Vous pouvez le faire en "
"utilisant le formulaire ci-dessous."
-#: registration/templates/registration/payment_form.html:173
+#: registration/templates/registration/payment_form.html:186
msgid ""
"If you want to use another payment method, please contact the tournament "
"organizers first. Then, if you need to send a proof or your payment, you can "
@@ -2682,11 +2700,6 @@ msgstr "oui,non,en attente"
msgid "valid:"
msgstr "valide :"
-#: registration/templates/registration/user_detail.html:163
-#: registration/views.py:461
-msgid "Update payment"
-msgstr "Modifier le paiement"
-
#: registration/templates/registration/user_detail.html:171
msgid "Download scholarship attestation"
msgstr "Télécharger l'attestation de bourse"
diff --git a/participation/templates/participation/team_detail.html b/participation/templates/participation/team_detail.html
index 0d6e0ed..b89e9d5 100644
--- a/participation/templates/participation/team_detail.html
+++ b/participation/templates/participation/team_detail.html
@@ -112,7 +112,6 @@
{% endif %}
-
{% if user.registration.is_volunteer %}
{% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %}
@@ -123,6 +122,30 @@
{% endif %}
{% endif %}
+
+ {% if team.participation.valid %}
+
+ {% for student in team.students.all %}
+ {% for payment in student.payments.all %}
+
+ {% trans "Payment of" %} {{ student }}
+ {% if payment.grouped %}({% trans "grouped" %}){% endif %}
+ {% if payment.final %} ({% trans "final" %}){% endif %} :
+
+
+ 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 %}
+
+ {% trans "Update payment" %}
+
+ {% endif %}
+ {% endif %}
+