Bug fixes + archive feature for Destinatäre

- Make Destinatär names clickable in list view (link to detail page)
- Nachweis-Board: auto-create missing VierteljahresNachweis records
  for active Destinatäre when viewing a year (fixes missing Q1 2026)
- Add archive/deactivate toggle for Destinatäre (button on detail page)
  with AuditLog entry and confirmation dialog
- Default Destinatär list to show active only (filter preset to "Aktiv")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
SysAdmin Agent
2026-03-11 20:07:30 +00:00
parent 113bd53a3a
commit cf127b043d
6 changed files with 47 additions and 3 deletions

View File

@@ -1578,6 +1578,14 @@ def nachweis_board(request):
destinataere = Destinataer.objects.filter(aktiv=True).order_by("nachname", "vorname")
# Auto-create missing VierteljahresNachweis records for the filtered year
for d in destinataere:
for q in range(1, 5):
VierteljahresNachweis.objects.get_or_create(
destinataer=d, jahr=jahr_filter, quartal=q,
defaults={"status": "offen"},
)
board = []
for d in destinataere:
quartale = {}