1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 17:42:23 +00:00

Improve payment admin page

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2023-04-05 10:44:27 +02:00
parent dfc45dbc93
commit 16c4376941
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
4 changed files with 26 additions and 9 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-04 19:54+0200\n"
"POT-Creation-Date: 2023-04-05 10:43+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -228,7 +228,8 @@ msgstr "numéro de passage"
#: draw/models.py:431
msgid ""
"The passage order in the pool, between 0 and the size of the pool minus 1."
msgstr "L'ordre de passage dans la poule, de 0 à la taille de la poule moins 1."
msgstr ""
"L'ordre de passage dans la poule, de 0 à la taille de la poule moins 1."
#: draw/models.py:439
msgid "choose index"
@ -237,7 +238,8 @@ msgstr "numéro de choix"
#: draw/models.py:440
msgid ""
"The choice order in the pool, between 0 and the size of the pool minus 1."
msgstr "L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1."
msgstr ""
"L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1."
#: draw/models.py:446 draw/models.py:469 participation/models.py:438
#: participation/models.py:592
@ -393,8 +395,7 @@ msgstr "changelogs"
msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
#: participation/admin.py:20 participation/models.py:326
#: participation/tables.py:43 registration/models.py:373
#: participation/admin.py:20 participation/tables.py:43
msgid "valid"
msgstr "valide"
@ -597,6 +598,10 @@ msgstr "finale"
msgid "tournaments"
msgstr "tournois"
#: participation/models.py:326
msgid "valid team"
msgstr "équipe valide"
#: participation/models.py:327
msgid "The participation got the validation of the organizers."
msgstr "La participation a été validée par les organisateur⋅rices."
@ -1481,6 +1486,10 @@ msgstr "prénom"
msgid "last name"
msgstr "nom de famille"
#: registration/admin.py:104
msgid "registration type"
msgstr "type d'inscription"
#: registration/forms.py:22
msgid "role"
msgstr "rôle"
@ -1722,6 +1731,10 @@ msgstr "informations additionnelles"
msgid "To help us to find your payment."
msgstr "Pour nous aider à retrouver votre paiement, si nécessaire."
#: registration/models.py:373
msgid "payment valid"
msgstr "paiement valide"
#: registration/models.py:382
#, python-brace-format
msgid "Payment of {registration}"

View File

@ -323,7 +323,7 @@ class Participation(models.Model):
valid = models.BooleanField(
null=True,
default=None,
verbose_name=_("valid"),
verbose_name=_("valid team"),
help_text=_("The participation got the validation of the organizers."),
)

View File

@ -96,7 +96,11 @@ class VolunteerRegistrationAdmin(PolymorphicChildModelAdmin):
@admin.register(Payment)
class PaymentAdmin(ModelAdmin):
list_display = ('registration', 'type', 'valid', )
list_display = ('registration', 'registration_type', 'type', 'valid', )
search_fields = ('registration__user__last_name', 'registration__user__first_name', 'registration__user__email',)
list_filter = ('type', 'valid',)
list_filter = ('registration__team__participation__valid', 'type', 'type', 'valid',)
autocomplete_fields = ('registration',)
@admin.display(description=_('registration type'), ordering='registration__polymorphic_ctype')
def registration_type(self, record: Payment):
return record.registration.get_real_instance().type

View File

@ -370,7 +370,7 @@ class Payment(models.Model):
)
valid = models.BooleanField(
verbose_name=_("valid"),
verbose_name=_("payment valid"),
null=True,
default=False,
)