Merge branch 'main' into schnacke
asdasd
This commit is contained in:
@@ -121,7 +121,7 @@ GridLayout
|
|||||||
|
|
||||||
SpinBox
|
SpinBox
|
||||||
{
|
{
|
||||||
property string name: "partitions"
|
property string name: "units"
|
||||||
id: partitions
|
id: partitions
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
from: 1
|
from: 1
|
||||||
@@ -177,7 +177,18 @@ GridLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
//New grid row
|
//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
|
Label
|
||||||
@@ -195,20 +206,7 @@ GridLayout
|
|||||||
}
|
}
|
||||||
|
|
||||||
//// New grid row
|
//// 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
|
Label
|
||||||
{
|
{
|
||||||
@@ -218,8 +216,8 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
property string name: "cleansing"
|
property string name: "cleaningproducts"
|
||||||
id: cleansing
|
id: cleaningproducts
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
placeholderTextColor: "red"
|
placeholderTextColor: "red"
|
||||||
@@ -235,7 +233,7 @@ GridLayout
|
|||||||
return (street.text.trim() && houseno.text.trim() &&
|
return (street.text.trim() && houseno.text.trim() &&
|
||||||
(postcode.editText.trim() || postcode.currentText.trim()) &&
|
(postcode.editText.trim() || postcode.currentText.trim()) &&
|
||||||
(city.editText.trim() || city.currentText.trim()) &&
|
(city.editText.trim() || city.currentText.trim()) &&
|
||||||
cleansing.text.trim())
|
cleaningproducts.text.trim())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,21 @@ GridLayout
|
|||||||
property var contacts: null
|
property var contacts: null
|
||||||
columns: 2
|
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
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Anrede")
|
text: qsTr("Anrede")
|
||||||
@@ -114,6 +129,7 @@ GridLayout
|
|||||||
if (Object.keys(contacts).length === 0)
|
if (Object.keys(contacts).length === 0)
|
||||||
{
|
{
|
||||||
enabled = false
|
enabled = false
|
||||||
|
console.log(contacts)
|
||||||
}
|
}
|
||||||
checkFields()
|
checkFields()
|
||||||
}
|
}
|
||||||
@@ -124,7 +140,7 @@ GridLayout
|
|||||||
{
|
{
|
||||||
id: addContact
|
id: addContact
|
||||||
text: qsTr("Hinzufügen")
|
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:
|
onClicked:
|
||||||
{
|
{
|
||||||
var num_contacts = 0
|
var num_contacts = 0
|
||||||
@@ -150,11 +166,6 @@ GridLayout
|
|||||||
mobile.text = ""
|
mobile.text = ""
|
||||||
posizion.text = ""
|
posizion.text = ""
|
||||||
|
|
||||||
if (Object.keys(contacts).length >= 3)
|
|
||||||
{
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
removeContact.enabled = true
|
removeContact.enabled = true
|
||||||
checkFields()
|
checkFields()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user