Enhance Destinataer functionality: inline editing and improved list view

- Add inline edit mode to destinataer detail view with AJAX save/cancel
- Fix form validation by aligning select choices with model definitions
- Update Destinataer model to make familienzweig and berufsgruppe optional
- Fix StiftungsKonto integration in forms and views
- Redesign destinataer list view with new column layout:
  * Vorname, Nachname, E-Mail, Vierteljährlicher Betrag
  * Letzter Studiennachweis, Unterstützung bestätigt, Aktionen
- Improve form styling and user experience
- Add proper field validation and error handling
- Enhance UI with better badges, icons, and formatting
This commit is contained in:
Stiftung Development
2025-09-19 23:52:26 +02:00
parent 584e2b8554
commit 69128196ef
6 changed files with 91 additions and 43 deletions

View File

@@ -24,7 +24,7 @@ from rest_framework.response import Response
from .models import (AppConfiguration, CSVImport, Destinataer,
DestinataerUnterstuetzung, DokumentLink, Foerderung, Land,
LandAbrechnung, LandVerpachtung, Paechter, Person,
UnterstuetzungWiederkehrend)
StiftungsKonto, UnterstuetzungWiederkehrend)
def get_pdf_generator():
@@ -1167,12 +1167,16 @@ def destinataer_detail(request, pk):
destinataer=destinataer
).order_by("-erstellt_am")
# Alle verfügbaren StiftungsKonten für das Select-Feld laden
stiftungskonten = StiftungsKonto.objects.all().order_by("kontoname")
context = {
"destinataer": destinataer,
"verknuepfte_dokumente": verknuepfte_dokumente,
"foerderungen": foerderungen,
"unterstuetzungen": unterstuetzungen,
"notizen_eintraege": notizen_eintraege,
"stiftungskonten": stiftungskonten,
}
return render(request, "stiftung/destinataer_detail.html", context)