Fix referrers display to show only current referrers.

Updated the view to loop through current referrers in the accompanying period. Added new method `getReferrersHistoryCurrent` to the entity to filter and return only active referrers, ensuring correct display in the UI. Also included documentation for better code clarity.
This commit is contained in:
2024-09-16 15:25:25 +02:00
parent 5dfbdad13d
commit 6f28d154c8
3 changed files with 27 additions and 3 deletions

View File

@@ -83,10 +83,10 @@
</div>
<div class="wl-col list">
{%- if w.referrers|length > 0 -%}
{% for r in w.referrersHistory %}
{% for r in w.referrersHistoryCurrent %}
<span class="wl-item">
<span class="badge-user">{{ r.user|chill_entity_render_box({'at_date': r.startDate}) }}</span>
{% if not loop.last %}, {% endif %}
{%- if not loop.last %}, {% endif %}
</span>
{% endfor %}
{% else %}