PLZ hinzugefügt
This commit is contained in:
137
Gui/AddContact.qml
Normal file
137
Gui/AddContact.qml
Normal file
@@ -0,0 +1,137 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: addContactLayout
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
columns: 2
|
||||
rowSpacing: 9
|
||||
visible: false
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Anrede")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "title"
|
||||
id: title
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Vorname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "firstname"
|
||||
id: firstname
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Nachname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "lastname"
|
||||
id: lastname
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Position")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "jobdescription"
|
||||
id: jobdescription
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("E-Mail")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "email"
|
||||
id: emailcontact
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Telefon")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "telephonecontact"
|
||||
id: telephonecontact
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Geburtsdatum")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthday"
|
||||
id: birthday
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Priorität")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "rank"
|
||||
id: rank
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Rechnung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "invoice"
|
||||
id: invoice
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
objectName: "combo"
|
||||
model: ["Nein", "Ja"]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Mahnung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "due"
|
||||
id: due
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: ["Nein", "Ja"]
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Fusion
|
||||
|
||||
import Gui
|
||||
import "../js/qmldict.js" as JsLib
|
||||
|
||||
ColumnLayout
|
||||
@@ -28,6 +28,7 @@ ColumnLayout
|
||||
|
||||
RowLayout
|
||||
{
|
||||
id: addCustomer
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
spacing: 45
|
||||
@@ -48,6 +49,7 @@ ColumnLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "business"
|
||||
id: firmenName
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
@@ -55,6 +57,7 @@ ColumnLayout
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
|
||||
|
||||
}
|
||||
|
||||
Label
|
||||
@@ -65,6 +68,7 @@ ColumnLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "street"
|
||||
id: street
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: isEmptyField()
|
||||
@@ -79,14 +83,13 @@ ColumnLayout
|
||||
|
||||
ComboBox
|
||||
{
|
||||
property string name: "postcode"
|
||||
id: postcode
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
onCurrentTextChanged: isEmptyField()
|
||||
onEditTextChanged: isEmptyField()
|
||||
model: ["test", "test2", "test3"]
|
||||
|
||||
|
||||
}
|
||||
|
||||
Label
|
||||
@@ -96,6 +99,7 @@ ColumnLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "city"
|
||||
id: city
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: isEmptyField(city)
|
||||
@@ -110,6 +114,7 @@ ColumnLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "telephone"
|
||||
id: telephone
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -121,6 +126,7 @@ ColumnLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "email"
|
||||
id: email
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -132,6 +138,7 @@ ColumnLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "homepage"
|
||||
id: homepage
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -143,6 +150,7 @@ ColumnLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "ceo"
|
||||
id: ceo
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -154,6 +162,7 @@ ColumnLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "taxno"
|
||||
id: taxno
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -164,8 +173,11 @@ ColumnLayout
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "typeid"
|
||||
id: typeid
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
editable: false
|
||||
|
||||
|
||||
}
|
||||
Label
|
||||
@@ -181,7 +193,7 @@ ColumnLayout
|
||||
|
||||
TextArea
|
||||
{
|
||||
|
||||
property string name: "customerinfo"
|
||||
id: customerInfo
|
||||
background: Rectangle
|
||||
{
|
||||
@@ -189,133 +201,11 @@ ColumnLayout
|
||||
border.color: customerInfo.activeFocus? customerInfo.palette.highlight: customerInfo.palette.base
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
GridLayout
|
||||
AddContact
|
||||
{
|
||||
id: addContactLayout
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignTop
|
||||
columns: 2
|
||||
rowSpacing: 9
|
||||
visible: false
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Anrede")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: title
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Vorname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: firstname
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Nachname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: lastname
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Position")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: jobdescription
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("E-Mail")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: emailcontact
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Telefon")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: telephonecontact
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Geburtsdatum")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: birthday
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Priorität")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: rank
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Rechnung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: invoice
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
objectName: "combo"
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Mahnung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: due
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout
|
||||
@@ -335,7 +225,19 @@ ColumnLayout
|
||||
enabled: false
|
||||
onClicked:
|
||||
{
|
||||
JsLib.addBusiness(businessGrid)
|
||||
var new_business
|
||||
if (!checkAddContact.checked)
|
||||
{
|
||||
new_business = JsLib.addBusiness(businessGrid)
|
||||
bm.addBusiness(new_business)
|
||||
}
|
||||
else
|
||||
{
|
||||
new_business = JsLib.addBusiness(businessGrid)
|
||||
var new_contact = JsLib.addBusiness(addContactLayout)
|
||||
bm.addBusiness(new_business)
|
||||
bm.setContact(new_contact)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user