1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 05: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 "" msgstr ""
"Project-Id-Version: TFJM\n" "Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \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" "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"
@ -228,7 +228,8 @@ msgstr "numéro de passage"
#: draw/models.py:431 #: draw/models.py:431
msgid "" msgid ""
"The passage order in the pool, between 0 and the size of the pool minus 1." "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 #: draw/models.py:439
msgid "choose index" msgid "choose index"
@ -237,7 +238,8 @@ msgstr "numéro de choix"
#: draw/models.py:440 #: draw/models.py:440
msgid "" msgid ""
"The choice order in the pool, between 0 and the size of the pool minus 1." "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 #: draw/models.py:446 draw/models.py:469 participation/models.py:438
#: participation/models.py:592 #: participation/models.py:592
@ -393,8 +395,7 @@ msgstr "changelogs"
msgid "Changelog of type \"{action}\" for model {model} at {timestamp}" msgid "Changelog of type \"{action}\" for model {model} at {timestamp}"
msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}" msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
#: participation/admin.py:20 participation/models.py:326 #: participation/admin.py:20 participation/tables.py:43
#: participation/tables.py:43 registration/models.py:373
msgid "valid" msgid "valid"
msgstr "valide" msgstr "valide"
@ -597,6 +598,10 @@ msgstr "finale"
msgid "tournaments" msgid "tournaments"
msgstr "tournois" msgstr "tournois"
#: participation/models.py:326
msgid "valid team"
msgstr "équipe valide"
#: participation/models.py:327 #: participation/models.py:327
msgid "The participation got the validation of the organizers." msgid "The participation got the validation of the organizers."
msgstr "La participation a été validée par les organisateur⋅rices." msgstr "La participation a été validée par les organisateur⋅rices."
@ -1481,6 +1486,10 @@ msgstr "prénom"
msgid "last name" msgid "last name"
msgstr "nom de famille" msgstr "nom de famille"
#: registration/admin.py:104
msgid "registration type"
msgstr "type d'inscription"
#: registration/forms.py:22 #: registration/forms.py:22
msgid "role" msgid "role"
msgstr "rôle" msgstr "rôle"
@ -1722,6 +1731,10 @@ msgstr "informations additionnelles"
msgid "To help us to find your payment." msgid "To help us to find your payment."
msgstr "Pour nous aider à retrouver votre paiement, si nécessaire." msgstr "Pour nous aider à retrouver votre paiement, si nécessaire."
#: registration/models.py:373
msgid "payment valid"
msgstr "paiement valide"
#: registration/models.py:382 #: registration/models.py:382
#, python-brace-format #, python-brace-format
msgid "Payment of {registration}" msgid "Payment of {registration}"

View File

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

View File

@ -96,7 +96,11 @@ class VolunteerRegistrationAdmin(PolymorphicChildModelAdmin):
@admin.register(Payment) @admin.register(Payment)
class PaymentAdmin(ModelAdmin): 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',) 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',) 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( valid = models.BooleanField(
verbose_name=_("valid"), verbose_name=_("payment valid"),
null=True, null=True,
default=False, default=False,
) )