feat(tags): add tab to show archived tags

This commit is contained in:
Herculino Trotta
2025-01-05 01:35:25 -03:00
parent 037014d024
commit 0fc8b0ee49
5 changed files with 94 additions and 44 deletions
+24
View File
@@ -32,6 +32,30 @@ def tags_list(request):
)
@only_htmx
@login_required
@require_http_methods(["GET"])
def tags_table_active(request):
tags = TransactionTag.objects.filter(active=True).order_by("id")
return render(
request,
"tags/fragments/table.html",
{"tags": tags, "active": True},
)
@only_htmx
@login_required
@require_http_methods(["GET"])
def tags_table_archived(request):
tags = TransactionTag.objects.filter(active=False).order_by("id")
return render(
request,
"tags/fragments/table.html",
{"tags": tags, "active": False},
)
@only_htmx
@login_required
@require_http_methods(["GET", "POST"])