generated from dopt-python/py311
additional custom logic
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "wce-crm"
|
name = "wce-crm"
|
||||||
version = "0.1.1dev6"
|
version = "0.1.1dev7"
|
||||||
description = "GUI for CRM of NAFKA project with WCE"
|
description = "GUI for CRM of NAFKA project with WCE"
|
||||||
authors = [
|
authors = [
|
||||||
{name = "d-opt GmbH, resp. Florian Förster", email = "f.foerster@d-opt.com"},
|
{name = "d-opt GmbH, resp. Florian Förster", email = "f.foerster@d-opt.com"},
|
||||||
@@ -71,7 +71,7 @@ directory = "reports/coverage"
|
|||||||
|
|
||||||
|
|
||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.1.1dev6"
|
current_version = "0.1.1dev7"
|
||||||
parse = """(?x)
|
parse = """(?x)
|
||||||
(?P<major>0|[1-9]\\d*)\\.
|
(?P<major>0|[1-9]\\d*)\\.
|
||||||
(?P<minor>0|[1-9]\\d*)\\.
|
(?P<minor>0|[1-9]\\d*)\\.
|
||||||
|
|||||||
@@ -357,7 +357,9 @@ grunderfassung_unternehmen: sql.Table = Table(
|
|||||||
Column("Kontaktperson__KP_funktion_beziehung", sql.Text, nullable=True),
|
Column("Kontaktperson__KP_funktion_beziehung", sql.Text, nullable=True),
|
||||||
Column("Kontaktperson__KP_mobilfunknummer", sql.Text, nullable=True),
|
Column("Kontaktperson__KP_mobilfunknummer", sql.Text, nullable=True),
|
||||||
Column("Kontaktperson__KP_name", sql.Text, nullable=True),
|
Column("Kontaktperson__KP_name", sql.Text, nullable=True),
|
||||||
Column("Kontaktperson__KP_name_partner", sql.Text, nullable=True),
|
Column(
|
||||||
|
"Kontaktperson__KP_name_partner", sql.Text, nullable=True
|
||||||
|
), # TODO: check if needed when set by trigger
|
||||||
Column("Kontaktperson__KP_titel", sql.Text, nullable=True),
|
Column("Kontaktperson__KP_titel", sql.Text, nullable=True),
|
||||||
Column("Kontaktperson__KP_vorname", sql.Text, nullable=True),
|
Column("Kontaktperson__KP_vorname", sql.Text, nullable=True),
|
||||||
Column("Partnersuche__kanal_aufmerksamkeit", sql.Text, nullable=True),
|
Column("Partnersuche__kanal_aufmerksamkeit", sql.Text, nullable=True),
|
||||||
|
|||||||
@@ -2653,7 +2653,7 @@ FORM_FIELDS_SEARCH_HEAD = [
|
|||||||
|
|
||||||
FORM_FIELDS_CONTACT_PERSON = [
|
FORM_FIELDS_CONTACT_PERSON = [
|
||||||
FormField(
|
FormField(
|
||||||
"Name Unternehmen/Netzwerkpartner (pre-filled von Suche)",
|
"Name Unternehmen/Netzwerkpartner (vorausgefüllt von Suche)",
|
||||||
FormFieldType.TEXT,
|
FormFieldType.TEXT,
|
||||||
key="KP_name_partner",
|
key="KP_name_partner",
|
||||||
required=False,
|
required=False,
|
||||||
@@ -3402,7 +3402,23 @@ class PageFormCompany(QWidget):
|
|||||||
container_layout.addSpacing(15)
|
container_layout.addSpacing(15)
|
||||||
|
|
||||||
# --- CUSTOM LOGIC ---
|
# --- CUSTOM LOGIC ---
|
||||||
# 'Bundesland' only if 'Inland' selected in 'Stammdaten'
|
# ** fill 'Kontaktperson -> Namen Unternehmen'
|
||||||
|
search_res = search_widgets_by_key(self.auto_form.widget_registry, "Partnersuche")
|
||||||
|
assert len(search_res) == 1
|
||||||
|
search_widget = cast(Grunderfassung_SuchWidget, search_res[0]["widget"])
|
||||||
|
self.search_widget_trigger = cast(
|
||||||
|
QLineEdit, search_widget.company_widgets["ma_unternehmensname"]
|
||||||
|
)
|
||||||
|
text_widget_set = search_widgets_by_key(
|
||||||
|
self.auto_form.widget_registry, f"Kontaktperson{COLUMN_SEP}KP_name_partner"
|
||||||
|
)
|
||||||
|
assert len(text_widget_set) == 1
|
||||||
|
self.text_widget_set = cast(QLineEdit, text_widget_set[0]["widget"])
|
||||||
|
self.search_widget_trigger.textChanged.connect(
|
||||||
|
self._custom_set_company_name_contact_person
|
||||||
|
)
|
||||||
|
|
||||||
|
# ** 'Bundesland' only if 'Inland' selected in 'Stammdaten'
|
||||||
person_location = search_widgets_by_key(
|
person_location = search_widgets_by_key(
|
||||||
self.auto_form.widget_registry, f"Stammdaten{COLUMN_SEP}aufenthaltsort"
|
self.auto_form.widget_registry, f"Stammdaten{COLUMN_SEP}aufenthaltsort"
|
||||||
)
|
)
|
||||||
@@ -3420,6 +3436,9 @@ class PageFormCompany(QWidget):
|
|||||||
self.selection_county.setProperty("styleClass", "stempel")
|
self.selection_county.setProperty("styleClass", "stempel")
|
||||||
self.selection_county.setEnabled(False)
|
self.selection_county.setEnabled(False)
|
||||||
|
|
||||||
|
def _custom_set_company_name_contact_person(self, value: str) -> None:
|
||||||
|
self.text_widget_set.setText(str(value))
|
||||||
|
|
||||||
def _custom_county_selection(self, idx: int) -> None:
|
def _custom_county_selection(self, idx: int) -> None:
|
||||||
value = self.person_location.itemData(idx)
|
value = self.person_location.itemData(idx)
|
||||||
if value == "Inland":
|
if value == "Inland":
|
||||||
|
|||||||
Reference in New Issue
Block a user