fix inbox duplicate

This commit is contained in:
Cayo Puigdefabregas 2025-02-20 18:11:06 +01:00
parent afced90f19
commit 8b644da29a
2 changed files with 4 additions and 7 deletions

View file

@ -35,10 +35,8 @@ class DashboardView(LoginRequiredMixin):
context = super().get_context_data(**kwargs)
lot_tags = LotTag.objects.filter(
owner=self.request.user.institution,
inbox=False
)
context.update({
"inbox": LotTag.objects.get(inbox=True).name,
"commit_id": settings.COMMIT,
'title': self.title,
'subtitle': self.subtitle,

View file

@ -129,15 +129,14 @@
{% trans 'Lots' %}
</a>
<ul class="flex-column mb-2 ul_sidebar accordion-collapse {% if path == 'tags' or path == 'lot' or path in 'unassigned dashboard' %}expanded{% else %}collapse{% endif %}" id="ul_lots" data-bs-parent="#sidebarMenu">
<li class="nav-item">
<a class="nav-link{% if path == 'unassigned' %} active2{% endif %}" href="{% url 'dashboard:unassigned' %}">
{{ inbox }}
</a>
</li>
{% for tag in lot_tags %}
<li class="nav-items">
{% if tag.inbox %}
<a class="nav-link{% if path == 'unassigned' %} active2{% endif %}" href="{% url 'dashboard:unassigned' %}">
{% else %}
<a class="nav-link{% if path == 'tags' %} active2{% endif %}" href="{% url 'lot:tags' tag.id %}">
{% endif %}
{{ tag.name }}
</a>
</li>