Skip to content

Commit

Permalink
fixed admin view on participants
Browse files Browse the repository at this point in the history
  • Loading branch information
Lung committed Dec 12, 2023
1 parent 797ce80 commit 5346f48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Settings/TwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function getTests(): array
new TwigTest('PatrolLeader', function ($participant): bool {
return $participant instanceof PatrolLeader;
}),
new TwigTest('PatrolParticipant', function ($participant): bool {
return $participant instanceof PatrolParticipant;
}),
new TwigTest('TroopLeader', function ($participant): bool {
return $participant instanceof TroopLeader;
}),
Expand Down
4 changes: 2 additions & 2 deletions src/Templates/translatable/widgets/detailsForAdmin.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
{% endif %}
</b></i><br/>
{% endif %}
{% if person.user.status.value != 'open' and person.getRegistrationCloseDate %}
{% if person is not PatrolParticipant and person.user.status.value != 'open' and person.getRegistrationCloseDate %}
<i>{% trans %}detail.closed-at{% endtrans %}: <b>{{ person.getRegistrationCloseDate.format('d. m. Y, H:i:s') }}</b></i><br/>
{% endif %}
{% if person.user.status.value == 'paid' and person.getRegistrationPayDate %}
{% if person is not PatrolParticipant and person.user.status.value == 'paid' and person.getRegistrationPayDate %}
<i>{% trans %}detail.paid-at{% endtrans %}: <b>{{ person.getRegistrationPayDate.format('d. m. Y, H:i:s') }}</b></i><br/>
{% endif %}
{% include 'widgets/adminNotice.twig' with {'participantId': person.id} %}

0 comments on commit 5346f48

Please sign in to comment.