diff --git a/Gui/AddCustomer.qml b/Gui/AddCustomer.qml index 5c5ea86..66e896c 100644 --- a/Gui/AddCustomer.qml +++ b/Gui/AddCustomer.qml @@ -90,7 +90,8 @@ ColumnLayout Connections { target: contact_model - onContactIdReady: + + function onContactIdReady() { var con_id = arguments[0] business_model.addBusiness(new_business, con_id) diff --git a/Gui/CustomerView.qml b/Gui/CustomerView.qml index d41a62f..867d625 100644 --- a/Gui/CustomerView.qml +++ b/Gui/CustomerView.qml @@ -5,7 +5,7 @@ import QtQuick.Layouts GridLayout { id: customerView - columns: 2 + columns: 4 Layout.fillWidth: true Layout.fillHeight: true rowSpacing: 9 @@ -18,6 +18,7 @@ GridLayout id: lblFirmenName text: qsTr("Firmenname") Layout.alignment: Qt.AlignRight | Qt.AlignVCenter + } TextField @@ -30,6 +31,7 @@ GridLayout onTextChanged: checkFields() placeholderText: "Pflichtfeld" placeholderTextColor: "red" + Layout.columnSpan: 3 } @@ -40,6 +42,8 @@ GridLayout Layout.alignment: Qt.AlignRight | Qt.AlignVCenter } + + TextField { property string name: "street" @@ -49,12 +53,37 @@ GridLayout placeholderText: "Pflichtfeld" placeholderTextColor: "red" } + + Label + { + text: qsTr("Nr.") + Layout.alignment: Qt.AlignRight | Qt.AlignVCenter + } + + TextField + { + property string name: "houseno" + id: housenoid + Layout.fillWidth: true + onTextChanged: checkFields() + placeholderText: "Pflichtfeld" + placeholderTextColor: "red" + validator: RegularExpressionValidator + { + regularExpression: /([0-9a-zA-Z\-]{1,6})/ + } + } + + Label { text: qsTr("PLZ") Layout.alignment: Qt.AlignRight } + + + ComboBox { property string name: "postcode" @@ -70,6 +99,7 @@ GridLayout popup.y: postcode.y + 5 - (postcode.height * 2) currentIndex: -1 onCurrentIndexChanged: city.currentIndex = postcode.currentIndex + Layout.columnSpan: 3 validator: RegularExpressionValidator { regularExpression: /([0-9]{1,5})/ @@ -95,6 +125,7 @@ GridLayout popup.height: 300 popup.y: postcode.y + 5 - (postcode.height * 2) currentIndex: -1 + Layout.columnSpan: 3 // onCurrentIndexChanged: postcode.currentIndex = city.currentIndex } @@ -108,6 +139,7 @@ GridLayout property string name: "telephone" id: telephone Layout.fillWidth: true + Layout.columnSpan: 3 validator: RegularExpressionValidator { regularExpression: /([+0-9]{1})([0-9]{1,17})/ @@ -125,6 +157,7 @@ GridLayout property string name: "cellphone" id: cellphone Layout.fillWidth: true + Layout.columnSpan: 3 validator: RegularExpressionValidator { regularExpression: /([+0-9]{1})([0-9]{1,17})/ @@ -142,6 +175,7 @@ GridLayout id: email Layout.fillWidth: true placeholderText: qsTr("beispiel@domain.de") + Layout.columnSpan: 3 validator: RegularExpressionValidator { regularExpression: /([\+!#$%&‘\*\–\/\=?\^_`\.{|}\~0-9A-Za-z]{1,185})@([0-9A-Za-z\.]{1,64})\.([a-zA-z]{2,5})/ @@ -158,6 +192,7 @@ GridLayout property string name: "homepage" id: homepage Layout.fillWidth: true + Layout.columnSpan: 3 placeholderText: "www.oschkarischtverhaftetwegensexy.jinx" } @@ -171,6 +206,7 @@ GridLayout property string name: "ceo" id: ceo Layout.fillWidth: true + Layout.columnSpan: 3 } Label @@ -183,6 +219,7 @@ GridLayout property string name: "taxno" id: taxno Layout.fillWidth: true + Layout.columnSpan: 3 } Label { @@ -197,6 +234,7 @@ GridLayout editable: false model: business_type textRole: "display" + Layout.columnSpan: 3 } Label { @@ -209,6 +247,7 @@ GridLayout id: infoView Layout.fillWidth: true Layout.preferredHeight: 100 + Layout.columnSpan: 3 ScrollBar.horizontal: ScrollBar { policy: ScrollBar.AlwaysOn