Kontaktadresse: Neues Feld Position, Filter-Funktionen null-sicher, Projektnamen-Spalte entfernt
- Server: Neue Spalte position in Kontaktadresse-Modell (String(200), nullable) - Server: Migration V01_04 (ALTER TABLE kontaktadressen ADD COLUMN position) - Server: position in Geschäftslogik create/update aufgenommen - Server: CLI-Musterdaten um Position ergänzt (Geschäftsführer, IT-Leiter etc.) - Client: position in iKontaktadresse-Interface, View nach Firma, Columnmapper, Filter - Client: Projektnamen-Spalte aus Kontaktadressenliste entfernt (steht in Überschrift) - Client: Filter-Funktionen in allen Listen null-sicher (kunde, kontakt, projekt, kontaktadresse, call_log) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
1 parent
b510c50497
commit
e9a2f48ede
10 files changed
+59
-36
No files matched your search
@@ -168,6 +168,7 @@ class Kontaktadresse(dbapp.Model):
|
||||
anrede = Column(String(30), nullable=True)
|
||||
name = Column(String(200), nullable=False)
|
||||
firma = Column(String(200), nullable=True)
|
||||
position = Column(String(200), nullable=True)
|
||||
telefon = Column(String(100), nullable=True)
|
||||
email = Column(String(200), nullable=True)
|
||||
strasse = Column(String(200), nullable=True)
|
||||
|
||||
@@ -78,6 +78,19 @@ def _db_V01_03():
|
||||
session.commit()
|
||||
|
||||
|
||||
def _db_V01_04():
|
||||
"""
|
||||
Fügt die Spalte 'position' zur Tabelle 'kontaktadressen' hinzu.
|
||||
Bei bestehenden Datenbanken, die mit Version 01.03 initialisiert wurden,
|
||||
fehlt diese Spalte, da das Feld erst nachträglich ergänzt wurde.
|
||||
"""
|
||||
from sqlalchemy import text
|
||||
|
||||
session.execute(text("ALTER TABLE kontaktadressen ADD COLUMN position VARCHAR(200)"))
|
||||
_updatesysteminfo('01.04')
|
||||
session.commit()
|
||||
|
||||
|
||||
def checkupdates():
|
||||
"""
|
||||
Ermittelt die aktuelle DB-Version aus der Systeminfo-Tabelle und führt alle
|
||||
|
||||
@@ -68,6 +68,7 @@ def create_kontaktadresse(data: dict) -> Kontaktadresse:
|
||||
kontaktadresse.anrede = (data.get("anrede") or "").strip() or None
|
||||
kontaktadresse.name = data["name"].strip()
|
||||
kontaktadresse.firma = (data.get("firma") or "").strip() or None
|
||||
kontaktadresse.position = (data.get("position") or "").strip() or None
|
||||
kontaktadresse.telefon = (data.get("telefon") or "").strip() or None
|
||||
kontaktadresse.email = (data.get("email") or "").strip() or None
|
||||
kontaktadresse.strasse = (data.get("strasse") or "").strip() or None
|
||||
@@ -107,6 +108,7 @@ def update_kontaktadresse(data: dict) -> Kontaktadresse:
|
||||
kontaktadresse.anrede = (data.get("anrede") or "").strip() or None
|
||||
kontaktadresse.name = data["name"].strip()
|
||||
kontaktadresse.firma = (data.get("firma") or "").strip() or None
|
||||
kontaktadresse.position = (data.get("position") or "").strip() or None
|
||||
kontaktadresse.telefon = (data.get("telefon") or "").strip() or None
|
||||
kontaktadresse.email = (data.get("email") or "").strip() or None
|
||||
kontaktadresse.strasse = (data.get("strasse") or "").strip() or None
|
||||
|
||||
Reference in new issue
Block a user