1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 17:42:24 +00: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
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 96 additions and 47 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TFJM\n" "Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n" "Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -30,6 +30,7 @@ msgstr "équipes"
#: participation/admin.py:16 participation/admin.py:73 #: participation/admin.py:16 participation/admin.py:73
#: participation/admin.py:104 participation/models.py:419 #: participation/admin.py:104 participation/models.py:419
#: participation/models.py:443 participation/models.py:513 #: participation/models.py:443 participation/models.py:513
#: registration/templates/registration/payment_form.html:51
msgid "tournament" msgid "tournament"
msgstr "tournoi" msgstr "tournoi"
@ -327,6 +328,7 @@ msgstr "Continuer le tirage"
#: draw/templates/draw/tournament_content.html:216 participation/admin.py:100 #: draw/templates/draw/tournament_content.html:216 participation/admin.py:100
#: participation/models.py:249 participation/models.py:434 #: participation/models.py:249 participation/models.py:434
#: registration/models.py:156 #: registration/models.py:156
#: registration/templates/registration/payment_form.html:50
msgid "team" msgid "team"
msgstr "équipe" msgstr "équipe"
@ -782,6 +784,7 @@ msgid "organizers"
msgstr "organisateur⋅rices" msgstr "organisateur⋅rices"
#: participation/models.py:336 #: participation/models.py:336
#: participation/templates/participation/team_detail.html:133
msgid "final" msgid "final"
msgstr "finale" msgstr "finale"
@ -1085,8 +1088,8 @@ msgstr "Rejoindre"
#: participation/templates/participation/pool_detail.html:110 #: participation/templates/participation/pool_detail.html:110
#: participation/templates/participation/pool_detail.html:128 #: participation/templates/participation/pool_detail.html:128
#: participation/templates/participation/pool_detail.html:133 #: participation/templates/participation/pool_detail.html:133
#: participation/templates/participation/team_detail.html:128 #: participation/templates/participation/team_detail.html:151
#: participation/templates/participation/team_detail.html:192 #: participation/templates/participation/team_detail.html:215
#: participation/templates/participation/tournament_form.html:12 #: participation/templates/participation/tournament_form.html:12
#: participation/templates/participation/update_team.html:12 #: participation/templates/participation/update_team.html:12
#: registration/templates/registration/update_user.html:16 #: 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/participation_detail.html:59
#: participation/templates/participation/passage_detail.html:132 #: participation/templates/participation/passage_detail.html:132
#: participation/templates/participation/pool_detail.html:138 #: 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_motivation_letter.html:13
#: participation/templates/participation/upload_notes.html:17 #: participation/templates/participation/upload_notes.html:17
#: participation/templates/participation/upload_solution.html:11 #: participation/templates/participation/upload_solution.html:11
@ -1439,21 +1442,36 @@ msgstr "Télécharger"
msgid "Replace" msgid "Replace"
msgstr "Remplacer" msgstr "Remplacer"
#: participation/templates/participation/team_detail.html:121 #: participation/templates/participation/team_detail.html:120
msgid "Download all submitted authorizations" msgid "Download all submitted authorizations"
msgstr "Télécharger toutes les autorisations soumises" msgstr "Télécharger toutes les autorisations soumises"
#: participation/templates/participation/team_detail.html:130 #: participation/templates/participation/team_detail.html:131
#: participation/templates/participation/team_detail.html:197 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 #: participation/templates/participation/team_leave.html:11
msgid "Leave" msgid "Leave"
msgstr "Quitter" msgstr "Quitter"
#: participation/templates/participation/team_detail.html:140 #: participation/templates/participation/team_detail.html:163
msgid "Access to team participation" msgid "Access to team participation"
msgstr "Accéder à la participation de l'équipe" msgstr "Accéder à la participation de l'équipe"
#: participation/templates/participation/team_detail.html:147 #: participation/templates/participation/team_detail.html:170
msgid "" msgid ""
"Your team has at least 4 members and a coach and all authorizations were " "Your team has at least 4 members and a coach and all authorizations were "
"given: the team can be validated." "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 " "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." "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" msgid "Submit my team to validation"
msgstr "Soumettre mon équipe à validation" msgstr "Soumettre mon équipe à validation"
#: participation/templates/participation/team_detail.html:158 #: participation/templates/participation/team_detail.html:181
msgid "" msgid ""
"Your team must be composed of 4 members and a coach and each member must " "Your team must be composed of 4 members and a coach and each member must "
"upload their authorizations and confirm its email address." "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 " "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." "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." msgid "This team didn't ask for validation yet."
msgstr "L'équipe n'a pas encore demandé à être validée." 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." msgid "Your validation is pending."
msgstr "Votre validation est en attente." msgstr "Votre validation est en attente."
#: participation/templates/participation/team_detail.html:173 #: participation/templates/participation/team_detail.html:196
msgid "" msgid ""
"The team requested to be validated. You may now control the authorizations " "The team requested to be validated. You may now control the authorizations "
"and confirm that they can participate." "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 " "L'équipe a demandé à être validée. Vous pouvez désormais contrôler les "
"différentes autorisations et confirmer qu'elle peut participer." "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" msgid "Validate"
msgstr "Valider" msgstr "Valider"
#: participation/templates/participation/team_detail.html:180 #: participation/templates/participation/team_detail.html:203
msgid "Invalidate" msgid "Invalidate"
msgstr "Invalider" msgstr "Invalider"
#: participation/templates/participation/team_detail.html:186 #: participation/templates/participation/team_detail.html:209
#: participation/views.py:329 #: participation/views.py:329
msgid "Upload motivation letter" msgid "Upload motivation letter"
msgstr "Envoyer la lettre de motivation" msgstr "Envoyer la lettre de motivation"
#: participation/templates/participation/team_detail.html:191 #: participation/templates/participation/team_detail.html:214
msgid "Update team" msgid "Update team"
msgstr "Modifier l'équipe" msgstr "Modifier l'équipe"
#: participation/templates/participation/team_detail.html:196 #: participation/templates/participation/team_detail.html:219
#: participation/views.py:438 #: participation/views.py:438
msgid "Leave team" msgid "Leave team"
msgstr "Quitter l'équipe" msgstr "Quitter l'équipe"
@ -1848,7 +1866,7 @@ msgid "Male"
msgstr "Homme" msgstr "Homme"
#: registration/models.py:165 #: registration/models.py:165
#: registration/templates/registration/payment_form.html:74 #: registration/templates/registration/payment_form.html:87
msgid "Other" msgid "Other"
msgstr "Autre" msgstr "Autre"
@ -2131,10 +2149,6 @@ msgstr "inscription de bénévole"
msgid "volunteer registrations" msgid "volunteer registrations"
msgstr "inscriptions de bénévoles" msgstr "inscriptions de bénévoles"
#: registration/models.py:521
msgid "grouped"
msgstr "groupé"
#: registration/models.py:523 #: registration/models.py:523
msgid "" msgid ""
"If set to true, then one payment is made for the full team, for example if " "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" msgstr "Pas de paiement"
#: registration/models.py:550 #: registration/models.py:550
#: registration/templates/registration/payment_form.html:57 #: registration/templates/registration/payment_form.html:70
msgid "Credit card" msgid "Credit card"
msgstr "Carte bancaire" msgstr "Carte bancaire"
@ -2181,7 +2195,7 @@ msgid "Scholarship"
msgstr "Notification de bourse" msgstr "Notification de bourse"
#: registration/models.py:552 #: registration/models.py:552
#: registration/templates/registration/payment_form.html:62 #: registration/templates/registration/payment_form.html:75
msgid "Bank transfer" msgid "Bank transfer"
msgstr "Virement bancaire" msgstr "Virement bancaire"
@ -2441,11 +2455,15 @@ msgstr ""
msgid "Group the payments of my team" msgid "Group the payments of my team"
msgstr "Regrouper les paiements de mon équipe" 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" msgid "I have a scholarship"
msgstr "J'ai une bourse" msgstr "J'ai une bourse"
#: registration/templates/registration/payment_form.html:84 #: registration/templates/registration/payment_form.html:97
msgid "" msgid ""
"The payment by credit card is made via Hello Asso. To do this, you can click " "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 " "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 " "paiement sécurisée de Hello Asso. La validation du paiement se fera alors "
"automatiquement, dans quelques minutes." "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" msgid "Go to the Hello Asso page"
msgstr "Aller à la page Hello Asso" msgstr "Aller à la page Hello Asso"
#: registration/templates/registration/payment_form.html:98 #: registration/templates/registration/payment_form.html:111
msgid "" msgid ""
"If a third party must pay for you (parents, school,…), you can send them the " "If a third party must pay for you (parents, school,…), you can send them the "
"link to pay for you:" "link to pay for you:"
@ -2469,11 +2487,11 @@ msgstr ""
"Si un tiers doit payer pour vous (parents, école, …), vous pouvez leur " "Si un tiers doit payer pour vous (parents, école, …), vous pouvez leur "
"envoyer le lien pour payer pour vous :" "envoyer le lien pour payer pour vous :"
#: registration/templates/registration/payment_form.html:108 #: registration/templates/registration/payment_form.html:121
msgid "Copied!" msgid "Copied!"
msgstr "Copié !" msgstr "Copié !"
#: registration/templates/registration/payment_form.html:115 #: registration/templates/registration/payment_form.html:128
msgid "" msgid ""
"If this is the case and if an invoice is necessary, please contact the " "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 " "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 " "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." "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 "" msgid ""
"You can also pay by bank transfer. To do this, you must put in the reference " "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 " "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 " "mettre en référence du virement « TFJMpu » suivi du nom et du prénom de "
"l'élève." "l'élève."
#: registration/templates/registration/payment_form.html:132 #: registration/templates/registration/payment_form.html:145
msgid "The bank details are as follows:" msgid "The bank details are as follows:"
msgstr "Les coordonnées bancaires sont les suivantes :" msgstr "Les coordonnées bancaires sont les suivantes :"
#: registration/templates/registration/payment_form.html:143 #: registration/templates/registration/payment_form.html:156
msgid "" msgid ""
"Once your payment done, please send us a proof of your transfer using the " "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, " "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 " "votre virement en utilisant le formulaire ci-dessous. La validation de votre "
"paiement se fera alors manuellement, sous quelques jours." "paiement se fera alors manuellement, sous quelques jours."
#: registration/templates/registration/payment_form.html:152 #: registration/templates/registration/payment_form.html:165
#: registration/templates/registration/payment_form.html:167 #: registration/templates/registration/payment_form.html:180
#: registration/templates/registration/payment_form.html:182 #: registration/templates/registration/payment_form.html:195
msgid "Submit" msgid "Submit"
msgstr "" msgstr "Envoyer"
#: registration/templates/registration/payment_form.html:158 #: registration/templates/registration/payment_form.html:171
msgid "" msgid ""
"The tournament is free for you if you have a scholarship. However, you must " "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." "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 " "devez nous envoyer un justificatif de votre bourse. Vous pouvez le faire en "
"utilisant le formulaire ci-dessous." "utilisant le formulaire ci-dessous."
#: registration/templates/registration/payment_form.html:173 #: registration/templates/registration/payment_form.html:186
msgid "" msgid ""
"If you want to use another payment method, please contact the tournament " "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 " "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:" msgid "valid:"
msgstr "valide :" 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 #: registration/templates/registration/user_detail.html:171
msgid "Download scholarship attestation" msgid "Download scholarship attestation"
msgstr "Télécharger l'attestation de bourse" msgstr "Télécharger l'attestation de bourse"

View File

@ -112,7 +112,6 @@
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadMotivationLetterModal">{% trans "Replace" %}</button> <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadMotivationLetterModal">{% trans "Replace" %}</button>
{% endif %} {% endif %}
</dd> </dd>
</dl>
{% if user.registration.is_volunteer %} {% if user.registration.is_volunteer %}
{% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %} {% if user.registration in self.team.participation.tournament.organizers or user.registration.is_admin %}
@ -123,6 +122,30 @@
</div> </div>
{% endif %} {% endif %}
{% 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>
<div class="card-footer text-center"> <div class="card-footer text-center">
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamModal">{% trans "Update" %}</button> <button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamModal">{% trans "Update" %}</button>

View File

@ -45,6 +45,19 @@
</div> </div>
{% endif %} {% endif %}
</p> </p>
<ul>
<li>{% trans "team"|capfirst %} : <a href="{% url "participation:team_detail" pk=payment.team.pk %}">{{ payment.team }}</a></li>
<li>{% trans "tournament"|capfirst %} : <a href="{% url "participation:tournament_detail" pk=payment.tournament.pk %}">{{ payment.tournament }}</a></li>
<li>
{% trans "Concerned students" %} :
<ul>
{% for reg in payment.registrations.all %}
<li><a href="{% url "registration:user_detail" pk=reg.user_id %}">{{ reg }}</a></li>
{% endfor %}
</ul>
</li>
</ul>
</div> </div>
<div class="card"> <div class="card">