Skip to content

Commit

Permalink
fix display for "Relances Créneaux" using dynamic registration date (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
janssens authored Aug 1, 2023
1 parent 2e45e54 commit e36c93d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/Resources/views/ambassador/phone/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,9 @@
{% if member.lastregistration %}
<strong>{{ member.lastregistration.date | date_short }}</strong>
<br />
{% set difference = member.lastregistration.date.diff(date('now')) %}
{% set m = difference.m %}
{% set y = difference.y %}
{% if y > 0 or m > 12 %}
<strong class="red-text">dépassé de {{ difference.days - 365 }} jours</strong>
{% if not member | uptodate %}
{% set difference = (member | expire).diff(date('now')) %}
<strong class="red-text">dépassé de {{ difference.days }} jours</strong>
{% endif %}
{% endif %}
</td>
Expand Down

0 comments on commit e36c93d

Please sign in to comment.