Change AddCustomer street to street and housenumber

This commit is contained in:
2024-12-19 12:07:19 +01:00
parent 0365439c50
commit 82c33d80b5
2 changed files with 42 additions and 2 deletions

View File

@@ -90,7 +90,8 @@ ColumnLayout
Connections Connections
{ {
target: contact_model target: contact_model
onContactIdReady:
function onContactIdReady()
{ {
var con_id = arguments[0] var con_id = arguments[0]
business_model.addBusiness(new_business, con_id) business_model.addBusiness(new_business, con_id)

View File

@@ -5,7 +5,7 @@ import QtQuick.Layouts
GridLayout GridLayout
{ {
id: customerView id: customerView
columns: 2 columns: 4
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
rowSpacing: 9 rowSpacing: 9
@@ -18,6 +18,7 @@ GridLayout
id: lblFirmenName id: lblFirmenName
text: qsTr("Firmenname") text: qsTr("Firmenname")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
} }
TextField TextField
@@ -30,6 +31,7 @@ GridLayout
onTextChanged: checkFields() onTextChanged: checkFields()
placeholderText: "Pflichtfeld" placeholderText: "Pflichtfeld"
placeholderTextColor: "red" placeholderTextColor: "red"
Layout.columnSpan: 3
} }
@@ -40,6 +42,8 @@ GridLayout
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
} }
TextField TextField
{ {
property string name: "street" property string name: "street"
@@ -49,12 +53,37 @@ GridLayout
placeholderText: "Pflichtfeld" placeholderText: "Pflichtfeld"
placeholderTextColor: "red" 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 Label
{ {
text: qsTr("PLZ") text: qsTr("PLZ")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
ComboBox ComboBox
{ {
property string name: "postcode" property string name: "postcode"
@@ -70,6 +99,7 @@ GridLayout
popup.y: postcode.y + 5 - (postcode.height * 2) popup.y: postcode.y + 5 - (postcode.height * 2)
currentIndex: -1 currentIndex: -1
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
Layout.columnSpan: 3
validator: RegularExpressionValidator validator: RegularExpressionValidator
{ {
regularExpression: /([0-9]{1,5})/ regularExpression: /([0-9]{1,5})/
@@ -95,6 +125,7 @@ GridLayout
popup.height: 300 popup.height: 300
popup.y: postcode.y + 5 - (postcode.height * 2) popup.y: postcode.y + 5 - (postcode.height * 2)
currentIndex: -1 currentIndex: -1
Layout.columnSpan: 3
// onCurrentIndexChanged: postcode.currentIndex = city.currentIndex // onCurrentIndexChanged: postcode.currentIndex = city.currentIndex
} }
@@ -108,6 +139,7 @@ GridLayout
property string name: "telephone" property string name: "telephone"
id: telephone id: telephone
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 3
validator: RegularExpressionValidator validator: RegularExpressionValidator
{ {
regularExpression: /([+0-9]{1})([0-9]{1,17})/ regularExpression: /([+0-9]{1})([0-9]{1,17})/
@@ -125,6 +157,7 @@ GridLayout
property string name: "cellphone" property string name: "cellphone"
id: cellphone id: cellphone
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 3
validator: RegularExpressionValidator validator: RegularExpressionValidator
{ {
regularExpression: /([+0-9]{1})([0-9]{1,17})/ regularExpression: /([+0-9]{1})([0-9]{1,17})/
@@ -142,6 +175,7 @@ GridLayout
id: email id: email
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: qsTr("beispiel@domain.de") placeholderText: qsTr("beispiel@domain.de")
Layout.columnSpan: 3
validator: RegularExpressionValidator validator: RegularExpressionValidator
{ {
regularExpression: /([\+!#$%&\*\\/\=?\^_`\.{|}\~0-9A-Za-z]{1,185})@([0-9A-Za-z\.]{1,64})\.([a-zA-z]{2,5})/ 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" property string name: "homepage"
id: homepage id: homepage
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 3
placeholderText: "www.oschkarischtverhaftetwegensexy.jinx" placeholderText: "www.oschkarischtverhaftetwegensexy.jinx"
} }
@@ -171,6 +206,7 @@ GridLayout
property string name: "ceo" property string name: "ceo"
id: ceo id: ceo
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 3
} }
Label Label
@@ -183,6 +219,7 @@ GridLayout
property string name: "taxno" property string name: "taxno"
id: taxno id: taxno
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 3
} }
Label Label
{ {
@@ -197,6 +234,7 @@ GridLayout
editable: false editable: false
model: business_type model: business_type
textRole: "display" textRole: "display"
Layout.columnSpan: 3
} }
Label Label
{ {
@@ -209,6 +247,7 @@ GridLayout
id: infoView id: infoView
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 100 Layout.preferredHeight: 100
Layout.columnSpan: 3
ScrollBar.horizontal: ScrollBar ScrollBar.horizontal: ScrollBar
{ {
policy: ScrollBar.AlwaysOn policy: ScrollBar.AlwaysOn