diff --git a/Gui/AddNewObject.qml b/Gui/AddNewObject.qml index 7ad44bc..808ba10 100644 --- a/Gui/AddNewObject.qml +++ b/Gui/AddNewObject.qml @@ -123,7 +123,7 @@ GridLayout SpinBox { - property string name: "partitions" + property string name: "units" id: partitions Layout.fillWidth: true from: 1 @@ -179,7 +179,18 @@ GridLayout } //New grid row - + Label + { + text: qsTr("Objekt-Nr.") + Layout.alignment: Qt.AlignRight + } + TextField + { + property string name: "objectno" + id: objectno + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter + } Label @@ -197,20 +208,7 @@ GridLayout } //// New grid row - Label - { - text: qsTr("Kontaktdaten") - Layout.alignment: Qt.AlignRight | Qt.AlignTop - } - ComboBox - { - property string name: "contact" - id: contact - Layout.fillWidth: true - editable: false - model: [qsTr("Beirat"), qsTr("Hausmeister")] - } Label { @@ -220,8 +218,8 @@ GridLayout TextField { - property string name: "cleansing" - id: cleansing + property string name: "cleaningproducts" + id: cleaningproducts Layout.fillWidth: true placeholderText: "Pflichtfeld" placeholderTextColor: "red" diff --git a/Gui/ObjectAddOnContactPerson.qml b/Gui/ObjectAddOnContactPerson.qml index bd163df..7d99aae 100644 --- a/Gui/ObjectAddOnContactPerson.qml +++ b/Gui/ObjectAddOnContactPerson.qml @@ -7,6 +7,21 @@ GridLayout property var contacts: null columns: 2 + Label + { + text: qsTr("Kontaktdaten") + Layout.alignment: Qt.AlignRight | Qt.AlignTop + } + + ComboBox + { + property string name: "contacttype" + id: contacttype + Layout.fillWidth: true + editable: false + model: [qsTr("Beirat"), qsTr("Hausmeister")] + } + Label { text: qsTr("Anrede") @@ -114,6 +129,7 @@ GridLayout if (Object.keys(contacts).length === 0) { enabled = false + console.log(contacts) } checkFields() } @@ -124,7 +140,7 @@ GridLayout { id: addContact text: qsTr("Hinzufügen") - enabled: firstname.text.trim() && lastname.text.trim() && (phonenumber.text.trim() || mobile.text.trim()) && posizion.text.trim() + enabled: firstname.text.trim() && lastname.text.trim() && (phonenumber.text.trim() || mobile.text.trim()) && posizion.text.trim() && (contacts === null || Object.keys(contacts).length < 3) onClicked: { var num_contacts = 0 @@ -150,11 +166,6 @@ GridLayout mobile.text = "" posizion.text = "" - if (Object.keys(contacts).length >= 3) - { - enabled = false - } - removeContact.enabled = true checkFields() } diff --git a/lib/DB/EmployeeModel.py b/lib/DB/EmployeeModel.py index 0897061..821218c 100644 --- a/lib/DB/EmployeeModel.py +++ b/lib/DB/EmployeeModel.py @@ -21,6 +21,7 @@ class EmployeeModel(QAbstractTableModel): self.__employee_dao.newEmployeeAdded.connect(self.__refreshView) self.__conf = ConfigLoader().getConfig() self.__key = self.__conf['pyqcrm']['ENCRYPTION_KEY'] + print(self.__key) self.__getData() @Slot(dict, bool)