Compare commits
11 Commits
f035f60910
...
00e535bb13
| Author | SHA256 | Date | |
|---|---|---|---|
| 00e535bb13 | |||
| 103b172a60 | |||
| c2edfab9a2 | |||
| 180f8e5ae9 | |||
| dab3df3b14 | |||
| 75dc64b4f3 | |||
| afad232068 | |||
| d870736dab | |||
| fc197246a6 | |||
| 705bffc8d3 | |||
| e94a9f9900 |
@@ -2,76 +2,172 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
ColumnLayout
|
// ScrollView
|
||||||
{
|
// {
|
||||||
anchors.fill: parent
|
// anchors.fill: parent
|
||||||
Label
|
// ScrollBar.vertical: ScrollBar
|
||||||
|
// {
|
||||||
|
// policy: ScrollBar.AlwaysOn
|
||||||
|
// }
|
||||||
|
ColumnLayout
|
||||||
{
|
{
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
id: colPar
|
||||||
id: headline
|
anchors.fill: parent
|
||||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
Label
|
||||||
font.pixelSize: 35
|
|
||||||
|
|
||||||
}
|
|
||||||
RowLayout
|
|
||||||
{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
ApplicantPersonalData
|
|
||||||
{
|
{
|
||||||
id: personalData
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
id: headline
|
||||||
|
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||||
|
font.pixelSize: 35
|
||||||
|
|
||||||
}
|
}
|
||||||
ColumnLayout
|
ButtonGroup
|
||||||
{
|
{
|
||||||
Layout.alignment: Qt.AlignTop
|
buttons: radio.children
|
||||||
CheckBox
|
onClicked:
|
||||||
{
|
{
|
||||||
id: checkcontactdata
|
checkFields()
|
||||||
|
personalData.requiredField()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
id: radio
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
checked: true
|
||||||
|
text: qsTr("Bewerber")
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
text: qsTr("Mitarbeiter")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 50
|
||||||
|
|
||||||
|
Frame
|
||||||
|
{
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Kontaktdaten")
|
ApplicantPersonalData
|
||||||
checked: false
|
|
||||||
onCheckStateChanged:
|
|
||||||
{
|
{
|
||||||
contactData.visible = checked
|
id: personalData
|
||||||
|
width: parent.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ApplicantContactData
|
|
||||||
|
Frame
|
||||||
{
|
{
|
||||||
id: contactData
|
Layout.alignment: Qt.AlignTop
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
CheckBox
|
|
||||||
{
|
|
||||||
id: checkbankdata
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Bankdaten")
|
visible: radio.children[1].checked
|
||||||
checked: false
|
ColumnLayout
|
||||||
onCheckStateChanged:
|
|
||||||
{
|
{
|
||||||
bankData.visible = checked
|
Layout.alignment: Qt.AlignTop
|
||||||
|
width: parent.width
|
||||||
|
// CheckBox
|
||||||
|
// {
|
||||||
|
// id: checkcontactdata
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// text: qsTr("Kontaktdaten")
|
||||||
|
// checked: false
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ApplicantContactData
|
||||||
|
// {
|
||||||
|
// visible: checkcontactdata.checked
|
||||||
|
// }
|
||||||
|
|
||||||
|
CheckBox
|
||||||
|
{
|
||||||
|
id: miniJobber
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Minijob")
|
||||||
|
checked: false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ApplicantBankData
|
||||||
|
{
|
||||||
|
id: bankAccount
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplicantNationalInsurance
|
||||||
|
{
|
||||||
|
id: nationalInsurance
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplicantVarious
|
||||||
|
{
|
||||||
|
// Layout.margins:
|
||||||
|
// {
|
||||||
|
// top: 30
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ApplicantBankData
|
|
||||||
{
|
|
||||||
id: bankData
|
|
||||||
visible: false
|
|
||||||
}
|
|
||||||
ApplicantNationality
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: qsTr("Abbrechen")
|
||||||
|
onClicked: appLoader.source = "EmployeeTable.qml"
|
||||||
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: saveBtn
|
||||||
|
text: qsTr("Speichern")
|
||||||
|
enabled: false
|
||||||
|
// onClicked:
|
||||||
|
// {
|
||||||
|
// if (!checkAddContact.checked)
|
||||||
|
// {
|
||||||
|
// new_business = JsLib.addBusiness(customerView)
|
||||||
|
// business_model.addBusiness(new_business, 0)
|
||||||
|
// appLoader.source = "EmployeeTable.qml"
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// new_business = JsLib.addBusiness(customerView)
|
||||||
|
// var new_contact = JsLib.addBusiness(addContactLayout)
|
||||||
|
// contact_model.addContact(new_contact)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
function checkFields()
|
||||||
|
{
|
||||||
|
if(radio.children[1].checked)
|
||||||
|
{
|
||||||
|
if(!personalData.checkPersonalField() || !bankAccount.checkBankField() )
|
||||||
|
saveBtn.enabled = false
|
||||||
|
else
|
||||||
|
saveBtn.enabled = true
|
||||||
|
}
|
||||||
|
else if (!personalData.checkPersonalField())
|
||||||
|
saveBtn.enabled = false
|
||||||
|
else
|
||||||
|
saveBtn.enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
|
||||||
}
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,185 +2,192 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
GridLayout
|
Frame
|
||||||
{
|
{
|
||||||
id: addContactLayout
|
id: addContactFrame
|
||||||
Layout.fillWidth: true
|
property alias contactGrid: addContactLayout
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
columns: 2
|
Layout.fillWidth: true
|
||||||
rowSpacing: 9
|
GridLayout
|
||||||
visible: false
|
{
|
||||||
property alias fname: firstname
|
id: addContactLayout
|
||||||
property alias lname: lastname
|
anchors.fill: parent
|
||||||
|
// Layout.fillWidth: true
|
||||||
|
// Layout.fillHeight: true
|
||||||
|
// Layout.alignment: Qt.AlignTop
|
||||||
|
columns: 2
|
||||||
|
rowSpacing: 9
|
||||||
|
property alias fname: firstname
|
||||||
|
property alias lname: lastname
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
|
||||||
text: qsTr("Anrede")
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
}
|
|
||||||
ComboBox
|
|
||||||
{
|
|
||||||
property string name: "title"
|
|
||||||
id: title
|
|
||||||
Layout.fillWidth: true
|
|
||||||
editable: false
|
|
||||||
model: ["Herr", "Frau"]
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Vorname")
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
property string name: "firstname"
|
|
||||||
id: firstname
|
|
||||||
Layout.fillWidth: true
|
|
||||||
onTextChanged: checkFields()
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Nachname")
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
property string name: "lastname"
|
|
||||||
id: lastname
|
|
||||||
Layout.fillWidth: true
|
|
||||||
onTextChanged: checkFields()
|
|
||||||
}
|
|
||||||
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
|
|
||||||
placeholderText: qsTr("beispiel@domain.de")
|
|
||||||
validator: RegularExpressionValidator
|
|
||||||
{
|
{
|
||||||
regularExpression: /([\+!#$%&‘\*\–\/\=?\^_`\.{|}\~0-9A-Za-z]{1,185})@([0-9A-Za-z\.]{1,64})\.([a-zA-z]{2,5})/
|
text: qsTr("Anrede")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
}
|
ComboBox
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Telefon")
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
property string name: "telephonecontact"
|
|
||||||
id: telephonecontact
|
|
||||||
Layout.fillWidth: true
|
|
||||||
validator: RegularExpressionValidator
|
|
||||||
{
|
{
|
||||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
property string name: "title"
|
||||||
|
id: title
|
||||||
|
Layout.fillWidth: true
|
||||||
|
editable: false
|
||||||
|
model: ["Herr", "Frau"]
|
||||||
}
|
}
|
||||||
}
|
Label
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Handy")
|
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
property string name: "cellphone"
|
|
||||||
id: cellphone
|
|
||||||
Layout.fillWidth: true
|
|
||||||
validator: RegularExpressionValidator
|
|
||||||
{
|
{
|
||||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
text: qsTr("Vorname")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
}
|
TextField
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Geburtsdatum")
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
}
|
|
||||||
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
property string name: "birthday"
|
|
||||||
id: birthday
|
|
||||||
Layout.fillWidth: true
|
|
||||||
placeholderText: qsTr("TT.MM.JJJJ")
|
|
||||||
validator: RegularExpressionValidator
|
|
||||||
|
|
||||||
{
|
{
|
||||||
regularExpression: /((^|)(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]))\.((^|)(0[1-9]{1}|1[0-2]{1}))\.((^|)(196[0-9]{1}|19[7-9]{1}[0-9]{1}|20[0-9]{2}))/
|
property string name: "firstname"
|
||||||
|
id: firstname
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onTextChanged: checkFields()
|
||||||
}
|
}
|
||||||
Keys.onPressed: (event)=>
|
|
||||||
|
Label
|
||||||
{
|
{
|
||||||
if (event.key !== Qt.Key_Backspace)
|
text: qsTr("Nachname")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
property string name: "lastname"
|
||||||
|
id: lastname
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onTextChanged: checkFields()
|
||||||
|
}
|
||||||
|
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
|
||||||
|
placeholderText: qsTr("beispiel@domain.de")
|
||||||
|
validator: RegularExpressionValidator
|
||||||
{
|
{
|
||||||
var len = birthday.length
|
regularExpression: /([\+!#$%&‘\*\–\/\=?\^_`\.{|}\~0-9A-Za-z]{1,185})@([0-9A-Za-z\.]{1,64})\.([a-zA-z]{2,5})/
|
||||||
var bd = birthday.text
|
}
|
||||||
if (len === 2 || len === 5) birthday.text = bd + "."
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Telefon")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
property string name: "telephonecontact"
|
||||||
|
id: telephonecontact
|
||||||
|
Layout.fillWidth: true
|
||||||
|
validator: RegularExpressionValidator
|
||||||
|
{
|
||||||
|
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Mobil")
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
property string name: "cellphone"
|
||||||
|
id: cellphone
|
||||||
|
Layout.fillWidth: true
|
||||||
|
validator: RegularExpressionValidator
|
||||||
|
{
|
||||||
|
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Geburtsdatum")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
property string name: "birthday"
|
||||||
|
id: birthday
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: qsTr("TT.MM.JJJJ")
|
||||||
|
validator: RegularExpressionValidator
|
||||||
|
|
||||||
|
{
|
||||||
|
regularExpression: /((^|)(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]))\.((^|)(0[1-9]{1}|1[0-2]{1}))\.((^|)(196[0-9]{1}|19[7-9]{1}[0-9]{1}|20[0-9]{2}))/
|
||||||
|
}
|
||||||
|
Keys.onPressed: (event)=>
|
||||||
|
{
|
||||||
|
if (event.key !== Qt.Key_Backspace)
|
||||||
|
{
|
||||||
|
var len = birthday.length
|
||||||
|
var bd = birthday.text
|
||||||
|
if (len === 2 || len === 5) birthday.text = bd + "."
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
Label
|
||||||
|
{
|
||||||
Label
|
text: qsTr("Priorität")
|
||||||
{
|
Layout.alignment: Qt.AlignRight
|
||||||
text: qsTr("Priorität")
|
}
|
||||||
Layout.alignment: Qt.AlignRight
|
ComboBox
|
||||||
}
|
{
|
||||||
ComboBox
|
property string name: "rank"
|
||||||
{
|
id: rank
|
||||||
property string name: "rank"
|
Layout.fillWidth: true
|
||||||
id: rank
|
editable: false
|
||||||
Layout.fillWidth: true
|
model: ["Nein", "Ja"]
|
||||||
editable: false
|
}
|
||||||
model: ["Nein", "Ja"]
|
Label
|
||||||
}
|
{
|
||||||
Label
|
text: qsTr("Rechnung")
|
||||||
{
|
Layout.alignment: Qt.AlignRight
|
||||||
text: qsTr("Rechnung")
|
}
|
||||||
Layout.alignment: Qt.AlignRight
|
ComboBox
|
||||||
}
|
{
|
||||||
ComboBox
|
property string name: "invoice"
|
||||||
{
|
id: invoice
|
||||||
property string name: "invoice"
|
Layout.fillWidth: true
|
||||||
id: invoice
|
editable: false
|
||||||
Layout.fillWidth: true
|
objectName: "combo"
|
||||||
editable: false
|
model: ["Nein", "Ja"]
|
||||||
objectName: "combo"
|
}
|
||||||
model: ["Nein", "Ja"]
|
Label
|
||||||
}
|
{
|
||||||
Label
|
text: qsTr("Mahnung")
|
||||||
{
|
Layout.alignment: Qt.AlignRight
|
||||||
text: qsTr("Mahnung")
|
}
|
||||||
Layout.alignment: Qt.AlignRight
|
ComboBox
|
||||||
}
|
{
|
||||||
ComboBox
|
property string name: "due"
|
||||||
{
|
id: due
|
||||||
property string name: "due"
|
Layout.fillWidth: true
|
||||||
id: due
|
editable: false
|
||||||
Layout.fillWidth: true
|
model: ["Nein", "Ja"]
|
||||||
editable: false
|
}
|
||||||
model: ["Nein", "Ja"]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkContactField()
|
function checkContactField()
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ ColumnLayout
|
|||||||
checked: false
|
checked: false
|
||||||
onCheckStateChanged:
|
onCheckStateChanged:
|
||||||
{
|
{
|
||||||
addContactLayout.visible = checked
|
|
||||||
checkFields()
|
checkFields()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,15 +36,21 @@ ColumnLayout
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
spacing: 45
|
spacing: 45
|
||||||
|
Frame
|
||||||
CustomerView
|
|
||||||
{
|
{
|
||||||
id: customerView
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Layout.fillWidth: true
|
||||||
|
CustomerView
|
||||||
|
{
|
||||||
|
id: customerView
|
||||||
|
width: parent.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AddContact
|
AddContact
|
||||||
{
|
{
|
||||||
id: addContactLayout
|
id: addContactFrame
|
||||||
|
visible: checkAddContact.checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout
|
RowLayout
|
||||||
@@ -73,7 +78,7 @@ ColumnLayout
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_business = JsLib.addBusiness(customerView)
|
new_business = JsLib.addBusiness(customerView)
|
||||||
var new_contact = JsLib.addBusiness(addContactLayout)
|
var new_contact = JsLib.addBusiness(addContactFrame.contactGrid)
|
||||||
contact_model.addContact(new_contact)
|
contact_model.addContact(new_contact)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +108,7 @@ ColumnLayout
|
|||||||
{
|
{
|
||||||
if(checkAddContact.checked)
|
if(checkAddContact.checked)
|
||||||
{
|
{
|
||||||
if(!customerView.checkBusinessField() || !addContactLayout.checkContactField())
|
if(!customerView.checkBusinessField() || !addContactFrame.checkContactField())
|
||||||
saveBtn.enabled = false
|
saveBtn.enabled = false
|
||||||
else
|
else
|
||||||
saveBtn.enabled = true
|
saveBtn.enabled = true
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ ColumnLayout
|
|||||||
checked: false
|
checked: false
|
||||||
onCheckStateChanged:
|
onCheckStateChanged:
|
||||||
{
|
{
|
||||||
addObjectLayout.visible = checked
|
|
||||||
//checkFields()
|
//checkFields()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,14 +37,21 @@ ColumnLayout
|
|||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
spacing: 45
|
spacing: 45
|
||||||
|
|
||||||
ObjectView
|
Frame
|
||||||
{
|
{
|
||||||
id: objectView
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Layout.fillWidth: true
|
||||||
|
ObjectView
|
||||||
|
{
|
||||||
|
id: objectView
|
||||||
|
width: parent.width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectAddOns
|
ObjectAddOns
|
||||||
{
|
{
|
||||||
id: addObjectLayout
|
id: addObjectLayout
|
||||||
|
visible: checkAddObject.checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RowLayout
|
RowLayout
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ ApplicationWindow
|
|||||||
text: qsTr("Eingesetzter Mitarbeiter")
|
text: qsTr("Eingesetzter Mitarbeiter")
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
ComboBox
|
||||||
{
|
{
|
||||||
id: assignee
|
id: assignee
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -103,10 +103,10 @@ ApplicationWindow
|
|||||||
text: qsTr("Hinzufügen")
|
text: qsTr("Hinzufügen")
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
if (assignee.text.trim() !== "" && duration.text.trim() !== "" && wage.text.trim() !== "" && cleanDays.text.trim() !== "" && tasks.text.trim() !== "" && output.text.trim() !== "")
|
if (duration.text.trim() !== "" && wage.text.trim() !== "" && cleanDays.text.trim() !== "" && tasks.text.trim() !== "" && output.text.trim() !== "")
|
||||||
{
|
{
|
||||||
var ne = {
|
var ne = {
|
||||||
"assignee": assignee.text.trim(),
|
"assignee": assignee.currentText,
|
||||||
"duration": duration.text.trim(),
|
"duration": duration.text.trim(),
|
||||||
"wage": wage.text.trim(),
|
"wage": wage.text.trim(),
|
||||||
"cleandays": cleanDays.text.trim(),
|
"cleandays": cleanDays.text.trim(),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts
|
|||||||
|
|
||||||
GridLayout
|
GridLayout
|
||||||
{
|
{
|
||||||
|
id: bankAccount
|
||||||
columns: 2
|
columns: 2
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -14,6 +15,8 @@ GridLayout
|
|||||||
{
|
{
|
||||||
id: iban
|
id: iban
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -25,5 +28,13 @@ GridLayout
|
|||||||
{
|
{
|
||||||
id: bankname
|
id: bankname
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
}
|
}
|
||||||
|
function checkBankField()
|
||||||
|
{
|
||||||
|
return (iban.text.trim() && bankname.text.trim())
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
52
Gui/ApplicantBirthData.qml
Normal file
52
Gui/ApplicantBirthData.qml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Geburtsname")
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: birthname
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Geburtsdatum")
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: birthday
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: qsTr("TT.MM.JJJJ")
|
||||||
|
validator: RegularExpressionValidator
|
||||||
|
|
||||||
|
{
|
||||||
|
regularExpression: /((^|)(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]))\.((^|)(0[1-9]{1}|1[0-2]{1}))\.((^|)(196[0-9]{1}|19[7-9]{1}[0-9]{1}|20[0-9]{2}))/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Geburtsort")
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: placeofbirth
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Geschlecht")
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBox
|
||||||
|
{
|
||||||
|
id: gender
|
||||||
|
Layout.fillWidth: true
|
||||||
|
editable: false
|
||||||
|
model: [qsTr("Mann"), qsTr("Frau"), qsTr("Divers")]
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ GridLayout
|
|||||||
{
|
{
|
||||||
text: qsTr("Straße")
|
text: qsTr("Straße")
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: street
|
id: street
|
||||||
@@ -23,9 +23,6 @@ GridLayout
|
|||||||
}
|
}
|
||||||
RowLayout
|
RowLayout
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
id: postcode
|
id: postcode
|
||||||
|
|||||||
19
Gui/ApplicantMiniJob.qml
Normal file
19
Gui/ApplicantMiniJob.qml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
GridLayout
|
||||||
|
{
|
||||||
|
columns: 2
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Knappschaft")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: knappschaft
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
131
Gui/ApplicantNationalInsurance.qml
Normal file
131
Gui/ApplicantNationalInsurance.qml
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
GridLayout
|
||||||
|
{
|
||||||
|
id: nationalInsurance
|
||||||
|
columns: 2
|
||||||
|
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Staatsangehörigkeit Deutsch")
|
||||||
|
}
|
||||||
|
|
||||||
|
ButtonGroup
|
||||||
|
{
|
||||||
|
buttons: radio.children
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
checkFields()
|
||||||
|
personalData.requiredField()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
id: radio
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
|
||||||
|
text: qsTr("Ja")
|
||||||
|
checked: true
|
||||||
|
}
|
||||||
|
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
text: qsTr("Nein")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Sozialversicherungs-Nr")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: socialnumber
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Steuer-ID")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: taxnumber
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Krankenkasse")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: medicalinsurance
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox
|
||||||
|
{
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
text: qsTr("Arbeitserlaubnis")
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Staatsangehörigkeit")
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: nationality
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Pass gültig bis")
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: pass
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Aufenthaltstitel gültig bis")
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: aufenthalt
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Pflichtfeld"
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2,91 +2,36 @@ import QtQuick
|
|||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
CheckBox
|
||||||
GridLayout
|
|
||||||
{
|
|
||||||
columns: 2
|
|
||||||
Label
|
|
||||||
{
|
{
|
||||||
text: qsTr("Staatsangehörigkeit Deutsch")
|
|
||||||
}
|
|
||||||
Row
|
|
||||||
{
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: radioyes
|
|
||||||
text: qsTr("Ja")
|
|
||||||
checked: true
|
|
||||||
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: radiono
|
|
||||||
text: qsTr("Nein")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Sozialversicherungs-Nr")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: socialnumber
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Steuer-ID")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: taxnumber
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Krankenkasse")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: medicalinsurance
|
|
||||||
}
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
|
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
visible: radiono.checked
|
text: qsTr("Arbeitserlaubnis")
|
||||||
GridLayout
|
|
||||||
{
|
|
||||||
columns: 2
|
|
||||||
CheckBox
|
|
||||||
{
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
text: qsTr("Arbeitserlaubnis")
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Staatsangehörigkeit")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: nationality
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Pass gültig bis")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: pass
|
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Aufenthaltstitel gültig bis")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: aufenthalt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Staatsangehörigkeit")
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: nationality
|
||||||
|
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Pass gültig bis")
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: pass
|
||||||
|
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Aufenthaltstitel gültig bis")
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: aufenthalt
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,32 +5,12 @@ import QtQuick.Layouts
|
|||||||
GridLayout
|
GridLayout
|
||||||
{
|
{
|
||||||
id: personalData
|
id: personalData
|
||||||
columns: 2
|
columns: 4
|
||||||
|
|
||||||
ButtonGroup
|
|
||||||
{
|
|
||||||
buttons: radio.children
|
|
||||||
}
|
|
||||||
|
|
||||||
Row
|
|
||||||
{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
id: radio
|
|
||||||
Layout.columnSpan: 2
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
checked: true
|
|
||||||
text: qsTr("Bewerber")
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
text: qsTr("Mitarbeiter")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Anrede")
|
text: qsTr("Anrede")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
@@ -38,10 +18,14 @@ GridLayout
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: false
|
editable: false
|
||||||
model: [qsTr("Herr"), qsTr("Frau")]
|
model: [qsTr("Herr"), qsTr("Frau")]
|
||||||
|
onCurrentTextChanged: briefAnrede.text = title.currentText === "Herr"? "Sehr geehrter " +
|
||||||
|
title.currentText: "Sehr geehrte " + title.currentText
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Vorname")
|
text: qsTr("Vorname")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
@@ -49,11 +33,13 @@ GridLayout
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
placeholderTextColor: "red"
|
placeholderTextColor: "red"
|
||||||
|
onTextChanged: checkFields()
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Nachname")
|
text: qsTr("Nachname")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
@@ -61,58 +47,124 @@ GridLayout
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
placeholderTextColor: "red"
|
placeholderTextColor: "red"
|
||||||
|
onTextChanged: checkFields()
|
||||||
|
Layout.columnSpan: 3
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Straße")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: street
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Geburtsname")
|
text: qsTr("Nr.")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: birthname
|
property string name: "houseno"
|
||||||
|
id: houseno
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Geburtsdatum")
|
text: qsTr("PLZ")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
|
||||||
|
ComboBox
|
||||||
{
|
{
|
||||||
id: birthday
|
id: postcode
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr("TT.MM.JJJJ")
|
editable: true
|
||||||
|
onCurrentTextChanged: checkFields()
|
||||||
|
onEditTextChanged: checkFields()
|
||||||
|
onActivated: currentValue
|
||||||
|
model: address_model
|
||||||
|
textRole: "display"
|
||||||
|
popup.height: 300
|
||||||
|
popup.y: postcode.y + 5 - (postcode.height * 2)
|
||||||
|
currentIndex: -1
|
||||||
|
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
|
||||||
validator: RegularExpressionValidator
|
validator: RegularExpressionValidator
|
||||||
|
|
||||||
{
|
{
|
||||||
regularExpression: /((^|)(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]))\.((^|)(0[1-9]{1}|1[0-2]{1}))\.((^|)(196[0-9]{1}|19[7-9]{1}[0-9]{1}|20[0-9]{2}))/
|
regularExpression: /([0-9]{1,5})/
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Label
|
|
||||||
{
|
|
||||||
text: qsTr("Geburtsort")
|
|
||||||
}
|
|
||||||
TextField
|
|
||||||
{
|
|
||||||
id: placeofbirth
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Geschlecht")
|
text: qsTr("Ort")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
}
|
}
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
id: gender
|
id: city
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: false
|
editable: true
|
||||||
model: [qsTr("Mann"), qsTr("Frau"), qsTr("Divers")]
|
onEditTextChanged: checkFields()
|
||||||
|
onCurrentTextChanged: checkFields()
|
||||||
|
model: address_model
|
||||||
|
textRole: "city"
|
||||||
|
popup.height: 300
|
||||||
|
popup.y: postcode.y + 5 - (postcode.height * 2)
|
||||||
|
currentIndex: -1
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Telefonnummer")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: phonenumber
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Mobil")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: cellphone
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("E-Mail")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: email
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Familienstand")
|
text: qsTr("Familienstand")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
visible: radio.children[1].checked
|
||||||
}
|
}
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
@@ -120,46 +172,106 @@ GridLayout
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
editable: false
|
editable: false
|
||||||
model: [qsTr("ledig"), qsTr("verheiratet"), qsTr("verwitwet"), qsTr("geschieden")]
|
model: [qsTr("ledig"), qsTr("verheiratet"), qsTr("verwitwet"), qsTr("geschieden")]
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Jobbeschreibung")
|
text: qsTr("Jobbeschreibung")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
visible: radio.children[1].checked
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: jobdescription
|
id: jobdescription
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Arbeitsbeginn")
|
text: qsTr("Arbeitsbeginn")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
visible: radio.children[1].checked
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: workstart
|
id: workstart
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Bei Befristung Ende")
|
text: qsTr("Bei Befristung Ende")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
visible: radio.children[1].checked
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: workend
|
id: workend
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Arbeitszeiten")
|
text: qsTr("Arbeitszeiten")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
visible: radio.children[1].checked
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: timetowork
|
id: timetowork
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
visible: radio.children[1].checked
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Briefanrede")
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
|
}
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: briefAnrede
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderTextColor: "red"
|
||||||
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.columnSpan: 4
|
||||||
|
}
|
||||||
|
function checkPersonalField()
|
||||||
|
{
|
||||||
|
if (radio.children[0].checked)
|
||||||
|
{
|
||||||
|
return (firstname.text.trim() && lastname.text.trim())
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log("Mitarbeiter")
|
||||||
|
return (firstname.text.trim() && lastname.text.trim())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function requiredField()
|
||||||
|
{
|
||||||
|
var pf = (radio.children[1].checked)?"Pflichtfeld":""
|
||||||
|
street.placeholderText = pf
|
||||||
|
phonenumber.placeholderText = pf
|
||||||
|
cellphone.placeholderText = pf
|
||||||
|
email.placeholderText = pf
|
||||||
|
jobdescription.placeholderText = pf
|
||||||
|
workstart.placeholderText = pf
|
||||||
|
workend.placeholderText = pf
|
||||||
|
timetowork.placeholderText = pf
|
||||||
|
briefAnrede.placeholderText = pf
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
53
Gui/ApplicantVarious.qml
Normal file
53
Gui/ApplicantVarious.qml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
GridLayout
|
||||||
|
{
|
||||||
|
columns: 2
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Grad der Behinderung")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: behinderung
|
||||||
|
placeholderText: "0,0"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Disponent")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: disponent
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Kostenstelle")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: kostenstelle
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Fremdlohn-Nr.")
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField
|
||||||
|
{
|
||||||
|
id: fremdLohnNummer
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
27
Gui/CustomerDetails.qml
Normal file
27
Gui/CustomerDetails.qml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
property int selectedClient: -1
|
||||||
|
id: clDet
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Ausgewählter Kunde " + selectedClient)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: qsTr("Kunden zeigen")
|
||||||
|
onClicked: customersStack.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
business_model.onRowClicked(selectedClient)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,206 +9,11 @@ Item {
|
|||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||||
id: test
|
id: test
|
||||||
|
|
||||||
SearchBar
|
StackView
|
||||||
{
|
{
|
||||||
id:searchBar
|
id: customersStack
|
||||||
anchors.margins: 9
|
anchors.fill: parent
|
||||||
}
|
initialItem: "CustomersTable.qml"
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: addBusinessBtn
|
|
||||||
icon.source: "qrc:/images/addbusiness.svg"
|
|
||||||
icon.color: "olive"
|
|
||||||
anchors.right: parent.right
|
|
||||||
flat: true
|
|
||||||
onClicked: appLoader.source = "AddCustomer.qml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout
|
|
||||||
{
|
|
||||||
id: tableColumn
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
top: searchBar.bottom
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout
|
|
||||||
{
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: showAll
|
|
||||||
checked: true
|
|
||||||
text: qsTr("Alle")
|
|
||||||
onClicked: viewCriterion(showAll)
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: showInterested
|
|
||||||
text: qsTr("Interessent")
|
|
||||||
onClicked: viewCriterion(showInterested)
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: showClientele
|
|
||||||
text: qsTr("Kunden")
|
|
||||||
onClicked: viewCriterion(showClientele)
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: showProvider
|
|
||||||
text: qsTr("Lieferant")
|
|
||||||
onClicked: viewCriterion(showProvider)
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
id: showFinished
|
|
||||||
text: qsTr("Erledigt")
|
|
||||||
onClicked: viewCriterion(showFinished)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
HorizontalHeaderView
|
|
||||||
{
|
|
||||||
id: horizontalHeader
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: 40
|
|
||||||
movableColumns: true //@disable-check M16
|
|
||||||
syncView: customerTable
|
|
||||||
|
|
||||||
delegate: Rectangle {
|
|
||||||
color: addBusinessBtn.palette.alternateBase
|
|
||||||
border.color: addBusinessBtn.palette.base
|
|
||||||
implicitHeight: 40
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitWidth: 1
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: model.display
|
|
||||||
elide: Text.ElideRight
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: addBusinessBtn.palette.text
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TableView
|
|
||||||
{
|
|
||||||
//property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2]
|
|
||||||
property real newWidth: 0
|
|
||||||
id: customerTable
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
ScrollBar.vertical: ScrollBar
|
|
||||||
{
|
|
||||||
policy: customerTable.contentHeight > customerTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
|
||||||
}
|
|
||||||
columnSpacing: 1
|
|
||||||
rowSpacing: 2
|
|
||||||
model: business_model
|
|
||||||
alternatingRows: true
|
|
||||||
resizableColumns: true // @disable-check M16
|
|
||||||
selectionBehavior: TableView.SelectRows
|
|
||||||
selectionModel: ItemSelectionModel
|
|
||||||
{
|
|
||||||
id: selModel
|
|
||||||
model: customerTable.model
|
|
||||||
}
|
|
||||||
|
|
||||||
// columnWidthProvider: function(column)
|
|
||||||
// {
|
|
||||||
// switch (column)
|
|
||||||
// {
|
|
||||||
// case 0: return width * 0.2;
|
|
||||||
// case 1: return width * 0.5;
|
|
||||||
// case 2: return width * 0.3;
|
|
||||||
// default: return width / model.columnCount();
|
|
||||||
// }
|
|
||||||
//return customWidths[column] * width;
|
|
||||||
//return tableColumn.content.implicitWidth // model.columnCount()
|
|
||||||
// newWidth = columnWidth(column)
|
|
||||||
// return newWidth
|
|
||||||
// }
|
|
||||||
|
|
||||||
Timer
|
|
||||||
{
|
|
||||||
id: redrawTable
|
|
||||||
running: true
|
|
||||||
interval: 1
|
|
||||||
repeat: false
|
|
||||||
onTriggered:
|
|
||||||
{
|
|
||||||
customerTable.forceLayout();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
delegate:Rectangle
|
|
||||||
{
|
|
||||||
required property bool selected
|
|
||||||
required property bool current
|
|
||||||
implicitWidth: customerTable.width / customerTable.columns
|
|
||||||
implicitHeight: 25
|
|
||||||
color: selected
|
|
||||||
? addBusinessBtn.palette.highlight //palette.highlight
|
|
||||||
: (customerTable.alternatingRows && row % 2 !== 0
|
|
||||||
? addBusinessBtn.palette.base // palette.base
|
|
||||||
: addBusinessBtn.palette.alternateBase) //palette.alternateBase)
|
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: model.display == null? "": model.display
|
|
||||||
elide: Text.ElideRight
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
leftPadding: 9 //@d isable-check M16
|
|
||||||
color: addBusinessBtn.palette.text
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea
|
|
||||||
{
|
|
||||||
property bool hovered: false
|
|
||||||
id: mouseArea
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
business_model.onRowClicked(row)
|
|
||||||
}
|
|
||||||
onEntered:
|
|
||||||
{
|
|
||||||
customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onContentWidthChanged:
|
|
||||||
{
|
|
||||||
//console.log("Model changed!!")
|
|
||||||
redrawTable.start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
//Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function viewCriterion(criterion)
|
|
||||||
{
|
|
||||||
business_model.viewCriterion(criterion.text)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ GridLayout
|
|||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Handy")
|
text: qsTr("Mobil")
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
|
|||||||
219
Gui/CustomersTable.qml
Normal file
219
Gui/CustomersTable.qml
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Qt.labs.qmlmodels
|
||||||
|
import QtQuick.Controls.Fusion
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
SearchBar
|
||||||
|
{
|
||||||
|
id:searchBar
|
||||||
|
anchors.margins: 9
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: addBusinessBtn
|
||||||
|
icon.source: "qrc:/images/addbusiness.svg"
|
||||||
|
icon.color: "olive"
|
||||||
|
anchors.right: parent.right
|
||||||
|
flat: true
|
||||||
|
onClicked: appLoader.source = "AddCustomer.qml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
id: tableColumn
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
top: searchBar.bottom
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
id: showAll
|
||||||
|
checked: true
|
||||||
|
text: qsTr("Alle")
|
||||||
|
onClicked: viewCriterion(showAll)
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
id: showInterested
|
||||||
|
text: qsTr("Interessent")
|
||||||
|
onClicked: viewCriterion(showInterested)
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
id: showClientele
|
||||||
|
text: qsTr("Kunden")
|
||||||
|
onClicked: viewCriterion(showClientele)
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
id: showProvider
|
||||||
|
text: qsTr("Lieferant")
|
||||||
|
onClicked: viewCriterion(showProvider)
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
id: showFinished
|
||||||
|
text: qsTr("Erledigt")
|
||||||
|
onClicked: viewCriterion(showFinished)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalHeaderView
|
||||||
|
{
|
||||||
|
id: horizontalHeader
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: 40
|
||||||
|
movableColumns: true //@disable-check M16
|
||||||
|
syncView: customerTable
|
||||||
|
|
||||||
|
delegate: Rectangle {
|
||||||
|
color: addBusinessBtn.palette.alternateBase
|
||||||
|
border.color: addBusinessBtn.palette.base
|
||||||
|
implicitHeight: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitWidth: 1
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: model.display
|
||||||
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
color: addBusinessBtn.palette.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TableView
|
||||||
|
{
|
||||||
|
//property var customWidths: [0.2, 0.5, 0.3, 05, 0.2, 0.2]
|
||||||
|
property real newWidth: 0
|
||||||
|
id: customerTable
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
ScrollBar.vertical: ScrollBar
|
||||||
|
{
|
||||||
|
policy: customerTable.contentHeight > customerTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||||
|
}
|
||||||
|
columnSpacing: 1
|
||||||
|
rowSpacing: 2
|
||||||
|
model: business_model
|
||||||
|
alternatingRows: true
|
||||||
|
resizableColumns: true // @disable-check M16
|
||||||
|
selectionBehavior: TableView.SelectRows
|
||||||
|
selectionModel: ItemSelectionModel
|
||||||
|
{
|
||||||
|
id: selModel
|
||||||
|
model: customerTable.model
|
||||||
|
}
|
||||||
|
|
||||||
|
// columnWidthProvider: function(column)
|
||||||
|
// {
|
||||||
|
// switch (column)
|
||||||
|
// {
|
||||||
|
// case 0: return width * 0.2;
|
||||||
|
// case 1: return width * 0.5;
|
||||||
|
// case 2: return width * 0.3;
|
||||||
|
// default: return width / model.columnCount();
|
||||||
|
// }
|
||||||
|
//return customWidths[column] * width;
|
||||||
|
//return tableColumn.content.implicitWidth // model.columnCount()
|
||||||
|
// newWidth = columnWidth(column)
|
||||||
|
// return newWidth
|
||||||
|
// }
|
||||||
|
|
||||||
|
Timer
|
||||||
|
{
|
||||||
|
id: redrawTable
|
||||||
|
running: true
|
||||||
|
interval: 1
|
||||||
|
repeat: false
|
||||||
|
onTriggered:
|
||||||
|
{
|
||||||
|
customerTable.forceLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
delegate:Rectangle
|
||||||
|
{
|
||||||
|
required property bool selected
|
||||||
|
required property bool current
|
||||||
|
implicitWidth: customerTable.width / customerTable.columns
|
||||||
|
implicitHeight: 25
|
||||||
|
color: selected
|
||||||
|
? addBusinessBtn.palette.highlight //palette.highlight
|
||||||
|
: (customerTable.alternatingRows && row % 2 !== 0
|
||||||
|
? addBusinessBtn.palette.base // palette.base
|
||||||
|
: addBusinessBtn.palette.alternateBase) //palette.alternateBase)
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: model.display == null? "": model.display
|
||||||
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
leftPadding: 9 //@d isable-check M16
|
||||||
|
color: addBusinessBtn.palette.text
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
property bool hovered: false
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
// onClicked:
|
||||||
|
// {
|
||||||
|
// business_model.onRowClicked(row)
|
||||||
|
// }
|
||||||
|
|
||||||
|
onDoubleClicked:
|
||||||
|
{
|
||||||
|
customersStack.push("CustomerDetails.qml", {selectedClient: row});
|
||||||
|
}
|
||||||
|
|
||||||
|
onEntered:
|
||||||
|
{
|
||||||
|
customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onContentWidthChanged:
|
||||||
|
{
|
||||||
|
//console.log("Model changed!!")
|
||||||
|
redrawTable.start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
//Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function viewCriterion(criterion)
|
||||||
|
{
|
||||||
|
business_model.viewCriterion(criterion.text)
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: customersStack.pop()
|
||||||
|
}
|
||||||
@@ -8,9 +8,124 @@ ColumnLayout
|
|||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
color: "blue"
|
color: "dimgrey"
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.bottomMargin: 9
|
Layout.bottomMargin: 3
|
||||||
|
radius: 45
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: contractButton
|
||||||
|
width: 300
|
||||||
|
height: 145
|
||||||
|
color: "darkslategray"
|
||||||
|
radius: 45
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
border.color: "steelblue"
|
||||||
|
border.width: 1
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: qsTr("Aufträge")
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.pixelSize: 45
|
||||||
|
font.bold: true
|
||||||
|
color: "lightgoldenrodyellow"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
onPressed:
|
||||||
|
{
|
||||||
|
contractButton.color = "darkolivegreen"
|
||||||
|
contractButton.border.width = 3
|
||||||
|
contractButton.border.color = "skyblue"
|
||||||
|
console.log("Aufträge...")
|
||||||
|
}
|
||||||
|
|
||||||
|
onReleased:
|
||||||
|
{
|
||||||
|
contractButton.color = "darkslategray"
|
||||||
|
contractButton.border.width = 1
|
||||||
|
contractButton.border.color = "steelblue"
|
||||||
|
}
|
||||||
|
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
var w = contractButton.border.width === 3? 1: 3
|
||||||
|
contractButton.border.width = w
|
||||||
|
}
|
||||||
|
|
||||||
|
onExited:
|
||||||
|
{
|
||||||
|
|
||||||
|
contractButton.color = "darkslategray"
|
||||||
|
contractButton.border.color = "steelblue"
|
||||||
|
contractButton.border.width = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: offerButton
|
||||||
|
width: 300
|
||||||
|
height: 145
|
||||||
|
color: "darkslategray"
|
||||||
|
radius: 45
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
border.color: "steelblue"
|
||||||
|
border.width: 1
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: qsTr("Angebote")
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.pixelSize: 45
|
||||||
|
font.bold: true
|
||||||
|
color: "lightgoldenrodyellow"
|
||||||
|
}
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
onPressed:
|
||||||
|
{
|
||||||
|
offerButton.color = "darkolivegreen"
|
||||||
|
offerButton.border.width = 3
|
||||||
|
offerButton.border.color = "skyblue"
|
||||||
|
console.log("Angebote...")
|
||||||
|
}
|
||||||
|
onReleased:
|
||||||
|
{
|
||||||
|
offerButton.color = "darkslategray"
|
||||||
|
offerButton.border.width = 1
|
||||||
|
offerButton.border.color = "steelblue"
|
||||||
|
}
|
||||||
|
|
||||||
|
onHoveredChanged:
|
||||||
|
{
|
||||||
|
var w = offerButton.border.width === 3? 1: 3
|
||||||
|
offerButton.border.width = w
|
||||||
|
}
|
||||||
|
|
||||||
|
onExited:
|
||||||
|
{
|
||||||
|
|
||||||
|
offerButton.color = "darkslategray"
|
||||||
|
offerButton.border.color = "steelblue"
|
||||||
|
offerButton.border.width = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
27
Gui/EmployeeDetails.qml
Normal file
27
Gui/EmployeeDetails.qml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
property int selectedEmployee: -1
|
||||||
|
id: emDet
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Ausgewählter Mitarbeiter " + selectedEmployee)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: qsTr("Mitarbeiter zeigen")
|
||||||
|
onClicked: employeesStack.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
business_model.onRowClicked(selectedEmployee)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,121 +4,13 @@ import QtQuick.Controls
|
|||||||
import Qt.labs.qmlmodels
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item
|
||||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
|
{
|
||||||
|
StackView
|
||||||
SearchBar
|
|
||||||
{
|
{
|
||||||
id:searchBar
|
id: employeesStack
|
||||||
anchors.margins: 9
|
anchors.fill: parent
|
||||||
}
|
initialItem: "EmployeesTable.qml"
|
||||||
|
|
||||||
ColumnLayout
|
|
||||||
{
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
|
|
||||||
top: searchBar.bottom
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout
|
|
||||||
{
|
|
||||||
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
|
|
||||||
checked: true
|
|
||||||
text: qsTr("Alle")
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
|
|
||||||
text: qsTr("Bewerber")
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
|
|
||||||
text: qsTr("Mitarbeiter")
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
|
|
||||||
text: qsTr("Erledigt")
|
|
||||||
}
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
|
|
||||||
text: qsTr("Ausgeschieden")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
HorizontalHeaderView
|
|
||||||
{
|
|
||||||
id: horizontalHeader
|
|
||||||
Layout.fillWidth: true
|
|
||||||
syncView: testTable
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
TableView
|
|
||||||
{
|
|
||||||
id: testTable
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
columnSpacing: 1
|
|
||||||
rowSpacing: 2
|
|
||||||
model: business_model
|
|
||||||
selectionBehavior: TableView.SelectRows
|
|
||||||
selectionModel: ItemSelectionModel
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
id: selModel
|
|
||||||
model: testTable.model
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
delegate:Rectangle
|
|
||||||
{
|
|
||||||
required property bool selected
|
|
||||||
required property bool current
|
|
||||||
implicitWidth: 200
|
|
||||||
implicitHeight: 25
|
|
||||||
color: selected? "lightblue": palette.base
|
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: model.display
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea
|
|
||||||
{
|
|
||||||
id: mouseArea
|
|
||||||
property bool hovered:false
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
business_model.onRowClicked(row)
|
|
||||||
testTable.selectionModel.select(testTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
132
Gui/EmployeesTable.qml
Normal file
132
Gui/EmployeesTable.qml
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Qt.labs.qmlmodels
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
|
||||||
|
|
||||||
|
SearchBar
|
||||||
|
{
|
||||||
|
id:searchBar
|
||||||
|
anchors.margins: 9
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: addEmployeeBtn
|
||||||
|
icon.source: "qrc:/images/addbusiness.svg"
|
||||||
|
icon.color: "olive"
|
||||||
|
anchors.right: parent.right
|
||||||
|
flat: true
|
||||||
|
onClicked: appLoader.source = "AddApplicant.qml"
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
|
||||||
|
top: searchBar.bottom
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
|
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
|
||||||
|
checked: true
|
||||||
|
text: qsTr("Alle")
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
|
||||||
|
text: qsTr("Bewerber")
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
|
||||||
|
text: qsTr("Mitarbeiter")
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
|
||||||
|
text: qsTr("Erledigt")
|
||||||
|
}
|
||||||
|
RadioButton
|
||||||
|
{
|
||||||
|
|
||||||
|
text: qsTr("Ausgeschieden")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalHeaderView
|
||||||
|
{
|
||||||
|
id: horizontalHeader
|
||||||
|
Layout.fillWidth: true
|
||||||
|
syncView: testTable
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TableView
|
||||||
|
{
|
||||||
|
id: testTable
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
columnSpacing: 1
|
||||||
|
rowSpacing: 2
|
||||||
|
model: business_model
|
||||||
|
selectionBehavior: TableView.SelectRows
|
||||||
|
selectionModel: ItemSelectionModel
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
id: selModel
|
||||||
|
model: testTable.model
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
delegate:Rectangle
|
||||||
|
{
|
||||||
|
required property bool selected
|
||||||
|
required property bool current
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: 25
|
||||||
|
color: selected? "lightblue": palette.base
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: model.display? model.display: ""
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
id: mouseArea
|
||||||
|
property bool hovered:false
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
|
||||||
|
onDoubleClicked:
|
||||||
|
{
|
||||||
|
employeesStack.push("EmployeeDetails.qml", {selectedEmployee: row});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: employeesStack.pop()
|
||||||
|
}
|
||||||
@@ -1,21 +1,26 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
ColumnLayout
|
Frame
|
||||||
{
|
{
|
||||||
id: addObjectLayout
|
Layout.alignment: Qt.AlignTop
|
||||||
visible: false
|
Layout.fillWidth: true
|
||||||
|
ColumnLayout
|
||||||
ObjectAddOnEmployee
|
|
||||||
{
|
{
|
||||||
id: oaoemployee
|
id: addObjectLayout
|
||||||
}
|
width: parent.width
|
||||||
ObjectAddOnContactPerson
|
ObjectAddOnEmployee
|
||||||
{
|
{
|
||||||
id: oaocontactperson
|
id: oaoemployee
|
||||||
}
|
}
|
||||||
Item
|
ObjectAddOnContactPerson
|
||||||
{
|
{
|
||||||
Layout.fillHeight: true
|
id: oaocontactperson
|
||||||
|
}
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
27
Gui/ObjectDetails.qml
Normal file
27
Gui/ObjectDetails.qml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
property int selectedObject: -1
|
||||||
|
id: obDet
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Ausgewählter Objekt " + selectedObject)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: qsTr("Objekts zeigen")
|
||||||
|
onClicked: customersStack.pop()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted:
|
||||||
|
{
|
||||||
|
business_model.onRowClicked(selectedObject)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,155 +6,13 @@ import QtQuick.Controls.Fusion
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
property var availableFilters: [""]
|
property var availableFilters: [""]
|
||||||
SearchBar
|
|
||||||
|
StackView
|
||||||
{
|
{
|
||||||
id:searchBar
|
id: objectsStack
|
||||||
anchors.margins: 9
|
anchors.fill: parent
|
||||||
|
initialItem: "ObjectsTable.qml"
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: addObjectBtn
|
|
||||||
icon.source: "qrc:/images/addbusiness.svg"
|
|
||||||
icon.color: "olive"
|
|
||||||
anchors.right: parent.right
|
|
||||||
flat: true
|
|
||||||
onClicked: appLoader.source = "AddObject.qml"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout
|
|
||||||
{
|
|
||||||
id: tableColumn
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
top: searchBar.bottom
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
|
|
||||||
HorizontalHeaderView
|
|
||||||
{
|
|
||||||
id: horizontalHeaderview
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitHeight: 40
|
|
||||||
visible: false
|
|
||||||
movableColumns: true //@disable-check M16
|
|
||||||
syncView: objectTable
|
|
||||||
|
|
||||||
delegate: Rectangle {
|
|
||||||
color: addObjectBtn.palette.alternateBase
|
|
||||||
border.color: addObjectBtn.palette.base
|
|
||||||
implicitHeight: 40
|
|
||||||
Layout.fillWidth: true
|
|
||||||
implicitWidth: 1
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: model.display
|
|
||||||
elide: Text.ElideRight
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
color: addObjectBtn.palette.text
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TableView
|
|
||||||
{
|
|
||||||
property real newWidth: 0
|
|
||||||
id: objectTable
|
|
||||||
Layout.fillHeight: true
|
|
||||||
Layout.fillWidth: true
|
|
||||||
ScrollBar.vertical: ScrollBar
|
|
||||||
{
|
|
||||||
policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
|
||||||
}
|
|
||||||
columnSpacing: 1
|
|
||||||
rowSpacing: 2
|
|
||||||
//model: object_model
|
|
||||||
alternatingRows: true
|
|
||||||
resizableColumns: true // @disable-check M16
|
|
||||||
selectionBehavior: TableView.SelectRows
|
|
||||||
selectionModel: ItemSelectionModel
|
|
||||||
{
|
|
||||||
id: obmodel
|
|
||||||
model: objectTable.model
|
|
||||||
}
|
|
||||||
|
|
||||||
// Timer
|
|
||||||
// {
|
|
||||||
// id: redrawTable
|
|
||||||
// running: true
|
|
||||||
// interval: 1
|
|
||||||
// repeat: false
|
|
||||||
// onTriggered:
|
|
||||||
// {
|
|
||||||
// objectTable.forceLayout();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
delegate:Rectangle
|
|
||||||
{
|
|
||||||
required property bool selected
|
|
||||||
required property bool current
|
|
||||||
implicitWidth: objectTable.width / objectTable.columns
|
|
||||||
implicitHeight: 25
|
|
||||||
color: selected
|
|
||||||
? addObjectBtn.palette.highlight //palette.highlight
|
|
||||||
: (objectTable.alternatingRows && row % 2 !== 0
|
|
||||||
? addObjectBtn.palette.base // palette.base
|
|
||||||
: addObjectBtn.palette.alternateBase) //palette.alternateBase)
|
|
||||||
|
|
||||||
Text
|
|
||||||
{
|
|
||||||
text: model.display == null? "": model.display
|
|
||||||
elide: Text.ElideRight
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
leftPadding: 9 //@d isable-check M16
|
|
||||||
color: addObjectBtn.palette.text
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea
|
|
||||||
{
|
|
||||||
property bool hovered: false
|
|
||||||
id: mouseArea
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
object_model.onRowClicked(row)
|
|
||||||
}
|
|
||||||
onEntered:
|
|
||||||
{
|
|
||||||
objectTable.selectionModel.select(objectTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// onContentWidthChanged:
|
|
||||||
// {
|
|
||||||
|
|
||||||
// redrawTable.start()
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// function viewCriterion(criterion)
|
|
||||||
// {
|
|
||||||
// object_model.viewCriterion(criterion.text)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
160
Gui/ObjectsTable.qml
Normal file
160
Gui/ObjectsTable.qml
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Qt.labs.qmlmodels
|
||||||
|
import QtQuick.Controls.Fusion
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
SearchBar
|
||||||
|
{
|
||||||
|
id:searchBar
|
||||||
|
anchors.margins: 9
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: addObjectBtn
|
||||||
|
icon.source: "qrc:/images/addbusiness.svg"
|
||||||
|
icon.color: "olive"
|
||||||
|
anchors.right: parent.right
|
||||||
|
flat: true
|
||||||
|
onClicked: appLoader.source = "AddObject.qml"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ColumnLayout
|
||||||
|
{
|
||||||
|
id: tableColumn
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
top: searchBar.bottom
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
HorizontalHeaderView
|
||||||
|
{
|
||||||
|
id: horizontalHeaderview
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: 40
|
||||||
|
visible: false
|
||||||
|
movableColumns: true //@disable-check M16
|
||||||
|
syncView: objectTable
|
||||||
|
|
||||||
|
delegate: Rectangle {
|
||||||
|
color: addObjectBtn.palette.alternateBase
|
||||||
|
border.color: addObjectBtn.palette.base
|
||||||
|
implicitHeight: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitWidth: 1
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: model.display
|
||||||
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
color: addObjectBtn.palette.text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TableView
|
||||||
|
{
|
||||||
|
property real newWidth: 0
|
||||||
|
id: objectTable
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
ScrollBar.vertical: ScrollBar
|
||||||
|
{
|
||||||
|
policy: objectTable.contentHeight > objectTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||||
|
}
|
||||||
|
columnSpacing: 1
|
||||||
|
rowSpacing: 2
|
||||||
|
//model: object_model
|
||||||
|
alternatingRows: true
|
||||||
|
resizableColumns: true // @disable-check M16
|
||||||
|
selectionBehavior: TableView.SelectRows
|
||||||
|
selectionModel: ItemSelectionModel
|
||||||
|
{
|
||||||
|
id: obmodel
|
||||||
|
model: objectTable.model
|
||||||
|
}
|
||||||
|
|
||||||
|
// Timer
|
||||||
|
// {
|
||||||
|
// id: redrawTable
|
||||||
|
// running: true
|
||||||
|
// interval: 1
|
||||||
|
// repeat: false
|
||||||
|
// onTriggered:
|
||||||
|
// {
|
||||||
|
// objectTable.forceLayout();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
delegate:Rectangle
|
||||||
|
{
|
||||||
|
required property bool selected
|
||||||
|
required property bool current
|
||||||
|
implicitWidth: objectTable.width / objectTable.columns
|
||||||
|
implicitHeight: 25
|
||||||
|
color: selected
|
||||||
|
? addObjectBtn.palette.highlight //palette.highlight
|
||||||
|
: (objectTable.alternatingRows && row % 2 !== 0
|
||||||
|
? addObjectBtn.palette.base // palette.base
|
||||||
|
: addObjectBtn.palette.alternateBase) //palette.alternateBase)
|
||||||
|
|
||||||
|
Text
|
||||||
|
{
|
||||||
|
text: model.display == null? "": model.display
|
||||||
|
elide: Text.ElideRight
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
leftPadding: 9 //@d isable-check M16
|
||||||
|
color: addObjectBtn.palette.text
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
property bool hovered: false
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onDoubleClicked:
|
||||||
|
{
|
||||||
|
objectsStack.push("ObjectDetails.qml", {selectedObject: row});
|
||||||
|
}
|
||||||
|
onEntered:
|
||||||
|
{
|
||||||
|
objectTable.selectionModel.select(objectTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// onContentWidthChanged:
|
||||||
|
// {
|
||||||
|
|
||||||
|
// redrawTable.start()
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// function viewCriterion(criterion)
|
||||||
|
// {
|
||||||
|
// object_model.viewCriterion(criterion.text)
|
||||||
|
// }
|
||||||
|
|
||||||
|
Component.onCompleted: objectsStack.pop()
|
||||||
|
}
|
||||||
@@ -41,7 +41,7 @@ ApplicationWindow
|
|||||||
top: topBar.bottom
|
top: topBar.bottom
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
topMargin: 0
|
topMargin: 0
|
||||||
bottomMargin: 9
|
bottomMargin: 5
|
||||||
rightMargin: 9
|
rightMargin: 9
|
||||||
leftMargin: 9
|
leftMargin: 9
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ ApplicationWindow
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (db_con) appLoader.source= "AddApplicant.qml"
|
if (db_con) appLoader.source= "LoginScreen.qml"
|
||||||
else appLoader.source= "NoDbConnection.qml"
|
else appLoader.source= "NoDbConnection.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
doc/PYQCRM_DATENBANK.odt
Normal file
BIN
doc/PYQCRM_DATENBANK.odt
Normal file
Binary file not shown.
1160
doc/datenbank.drawio
1160
doc/datenbank.drawio
File diff suppressed because it is too large
Load Diff
1594
doc/db_schemer_v1.1-pyqcrm-202501210906.sql
Normal file
1594
doc/db_schemer_v1.1-pyqcrm-202501210906.sql
Normal file
File diff suppressed because it is too large
Load Diff
17097
doc/db_schemer_v1.1-pyqcrm-202501220855.sql
Normal file
17097
doc/db_schemer_v1.1-pyqcrm-202501220855.sql
Normal file
File diff suppressed because it is too large
Load Diff
17410
doc/db_schemer_v1.1-pyqcrm-202501231021.sql
Normal file
17410
doc/db_schemer_v1.1-pyqcrm-202501231021.sql
Normal file
File diff suppressed because it is too large
Load Diff
BIN
doc/pyqcrm_er_diagram.png
Normal file
BIN
doc/pyqcrm_er_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 325 KiB |
@@ -8,13 +8,17 @@ class AddressDAO:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
#print(f"*** File: {__file__}, init()")
|
#print(f"*** File: {__file__}, init()")
|
||||||
self.__con = DbManager().getConnection()
|
self.__con = DbManager().getConnection()
|
||||||
|
|
||||||
if self.__con:
|
if self.__con:
|
||||||
self.__cur = self.__con.cursor()
|
self.__cur = self.__con.cursor()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def __importPlz(self):
|
def __importPlz(self):
|
||||||
with open("import json filepath here", "r") as plz:
|
with open("pfad zur datei", "r") as plz:
|
||||||
postcodes = json.load(plz)
|
postcodes = json.load(plz)
|
||||||
|
irgendwas = ""
|
||||||
try:
|
try:
|
||||||
for i in postcodes:
|
for i in postcodes:
|
||||||
test =i["plz_name"].split(",")
|
test =i["plz_name"].split(",")
|
||||||
@@ -24,13 +28,44 @@ class AddressDAO:
|
|||||||
town = town.strip()
|
town = town.strip()
|
||||||
if town:
|
if town:
|
||||||
print(f"PROCESSING {i['name']} {town}")
|
print(f"PROCESSING {i['name']} {town}")
|
||||||
self.__cur.callproc("addZipCodes", (i["name"], town,))
|
self.__cur.callproc("addZipCodes", (i["name"], town, irgendwas,))
|
||||||
|
#self.__cur.callproc("addZipCodes", ("56271", "Kleinmaischeid", irgendwas,))
|
||||||
except mariadb.OperationalError as e:
|
except mariadb.OperationalError as e:
|
||||||
print(f"Database Error: {e}")
|
print(f"Database Error: {e}")
|
||||||
finally:
|
finally:
|
||||||
self.__con.commit()
|
self.__con.commit()
|
||||||
print("FINISHED")#
|
print("FINISHED")#
|
||||||
|
|
||||||
|
def __importCountry(self):
|
||||||
|
with open("pfad zur datei", "r") as country:
|
||||||
|
countries = json.load(country)
|
||||||
|
old = ""
|
||||||
|
try:
|
||||||
|
for i in countries["daten"]:
|
||||||
|
if i[4] == "–":
|
||||||
|
continue
|
||||||
|
elif i[8] == "YU":
|
||||||
|
continue
|
||||||
|
elif i[4] == old:
|
||||||
|
continue
|
||||||
|
elif i[4] == "Serbien und Montenegro":
|
||||||
|
continue
|
||||||
|
elif i[4] == "Bosnien und Herzegowina":
|
||||||
|
continue
|
||||||
|
|
||||||
|
print(i[4], i[3], i[2], i[8], i[7])
|
||||||
|
|
||||||
|
self.__cur.execute("INSERT INTO country (country, countryshort, nationality, iso2, iso3) VALUES (%s, %s, %s, %s, %s)", (i[4], i[3], i[2], i[8], i[7]))
|
||||||
|
old = i[4]
|
||||||
|
except mariadb.OperationalError as e:
|
||||||
|
print(f"Database Error: {e}")
|
||||||
|
finally:
|
||||||
|
self.__con.commit()
|
||||||
|
print("FINISHED")#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def getAddressData(self, all = True, zipcode = None):
|
def getAddressData(self, all = True, zipcode = None):
|
||||||
try:
|
try:
|
||||||
if self.__cur:
|
if self.__cur:
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -15,6 +15,8 @@ from lib.DB.BTypeModel import BTypeModel
|
|||||||
from lib.DB.ContactModel import ContactModel
|
from lib.DB.ContactModel import ContactModel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [pyqcrm]
|
# [pyqcrm]
|
||||||
# program-name=""
|
# program-name=""
|
||||||
# version=
|
# version=
|
||||||
|
|||||||
10
qml.qrc
10
qml.qrc
@@ -29,5 +29,15 @@
|
|||||||
<file>Gui/ApplicantContactData.qml</file>
|
<file>Gui/ApplicantContactData.qml</file>
|
||||||
<file>Gui/ApplicantBankData.qml</file>
|
<file>Gui/ApplicantBankData.qml</file>
|
||||||
<file>Gui/ApplicantNationality.qml</file>
|
<file>Gui/ApplicantNationality.qml</file>
|
||||||
|
<file>Gui/ApplicantNationalInsurance.qml</file>
|
||||||
|
<file>Gui/ApplicantMiniJob.qml</file>
|
||||||
|
<file>Gui/ApplicantVarious.qml</file>
|
||||||
|
<file>Gui/ApplicantBirthData.qml</file>
|
||||||
|
<file>Gui/CustomersTable.qml</file>
|
||||||
|
<file>Gui/CustomerDetails.qml</file>
|
||||||
|
<file>Gui/ObjectsTable.qml</file>
|
||||||
|
<file>Gui/EmployeesTable.qml</file>
|
||||||
|
<file>Gui/EmployeeDetails.qml</file>
|
||||||
|
<file>Gui/ObjectDetails.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Reference in New Issue
Block a user