diff --git a/Gui/AddNewObject.qml b/Gui/AddNewObject.qml index f19120a..438871b 100644 --- a/Gui/AddNewObject.qml +++ b/Gui/AddNewObject.qml @@ -121,7 +121,7 @@ GridLayout SpinBox { - property string name: "partitions" + property string name: "units" id: partitions Layout.fillWidth: true from: 1 @@ -177,7 +177,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 @@ -195,20 +206,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 { @@ -218,8 +216,8 @@ GridLayout TextField { - property string name: "cleansing" - id: cleansing + property string name: "cleaningproducts" + id: cleaningproducts Layout.fillWidth: true placeholderText: "Pflichtfeld" placeholderTextColor: "red" @@ -235,7 +233,7 @@ GridLayout return (street.text.trim() && houseno.text.trim() && (postcode.editText.trim() || postcode.currentText.trim()) && (city.editText.trim() || city.currentText.trim()) && - cleansing.text.trim()) + cleaningproducts.text.trim()) } } 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() }