Compare commits
6 Commits
338733a0fb
...
74b00c0b94
| Author | SHA256 | Date | |
|---|---|---|---|
| 74b00c0b94 | |||
| 716915f333 | |||
| 538399b59a | |||
| 8e9fe46b96 | |||
| ba08715c9a | |||
| 104aba8347 |
@@ -3,15 +3,9 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "../js/qmldict.js" as JsLib
|
||||
|
||||
// ScrollView
|
||||
// {
|
||||
// anchors.fill: parent
|
||||
// ScrollBar.vertical: ScrollBar
|
||||
// {
|
||||
// policy: ScrollBar.AlwaysOn
|
||||
// }
|
||||
ColumnLayout
|
||||
{
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
id: colPar
|
||||
anchors.fill: parent
|
||||
Label
|
||||
@@ -20,7 +14,6 @@ import "../js/qmldict.js" as JsLib
|
||||
id: headline
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
font.pixelSize: 35
|
||||
|
||||
}
|
||||
ButtonGroup
|
||||
{
|
||||
@@ -30,7 +23,6 @@ import "../js/qmldict.js" as JsLib
|
||||
checkFields()
|
||||
personalData.requiredField()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Row
|
||||
@@ -46,7 +38,6 @@ import "../js/qmldict.js" as JsLib
|
||||
RadioButton
|
||||
{
|
||||
text: qsTr("Mitarbeiter")
|
||||
|
||||
}
|
||||
}
|
||||
RowLayout
|
||||
@@ -74,28 +65,6 @@ import "../js/qmldict.js" as JsLib
|
||||
{
|
||||
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
|
||||
{
|
||||
@@ -109,17 +78,12 @@ import "../js/qmldict.js" as JsLib
|
||||
|
||||
ApplicantVarious
|
||||
{
|
||||
// Layout.margins:
|
||||
// {
|
||||
// top: 30
|
||||
// }
|
||||
id: applicantVarious
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
@@ -136,19 +100,22 @@ import "../js/qmldict.js" as JsLib
|
||||
enabled: false
|
||||
onClicked:
|
||||
{
|
||||
var new_applicant
|
||||
if (radio.children[0].checked)
|
||||
{
|
||||
var new_applicant = JsLib.addApplicant(personalData)
|
||||
new_applicant = JsLib.parseForm(personalData)
|
||||
// business_model.addApplicant(new_business, 0)
|
||||
// appLoader.source = "EmployeeTable.qml"
|
||||
console.log(JSON.stringify (new_applicant))
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// new_applicant = JsLib.addApplicant(customerView)
|
||||
else
|
||||
{
|
||||
// console.log(personalData, bankAccount, nationalInsurance, applicantVarious)
|
||||
new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious)
|
||||
// var new_contact = JsLib.addApplicant(addContactLayout)
|
||||
// contact_model.addContact(new_contact)
|
||||
// }
|
||||
console.log(JSON.stringify (new_applicant))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,7 +127,7 @@ import "../js/qmldict.js" as JsLib
|
||||
{
|
||||
if(radio.children[1].checked)
|
||||
{
|
||||
if(!personalData.checkPersonalField() || !bankAccount.checkBankField() )
|
||||
if(!personalData.checkPersonalField())
|
||||
saveBtn.enabled = false
|
||||
else
|
||||
saveBtn.enabled = true
|
||||
@@ -170,6 +137,6 @@ import "../js/qmldict.js" as JsLib
|
||||
else
|
||||
saveBtn.enabled = true
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,14 +71,14 @@ ColumnLayout
|
||||
{
|
||||
if (!checkAddContact.checked)
|
||||
{
|
||||
new_business = JsLib.addBusiness(customerView)
|
||||
new_business = JsLib.parseForm(customerView)
|
||||
business_model.addBusiness(new_business, 0)
|
||||
appLoader.source = "CustomerTable.qml"
|
||||
}
|
||||
else
|
||||
{
|
||||
new_business = JsLib.addBusiness(customerView)
|
||||
var new_contact = JsLib.addBusiness(addContactFrame.contactGrid)
|
||||
new_business = JsLib.parseForm(customerView)
|
||||
var new_contact = JsLib.parseForm(addContactFrame.contactGrid)
|
||||
contact_model.addContact(new_contact)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,14 +72,14 @@ ColumnLayout
|
||||
{
|
||||
if (!checkAddObject.checked)
|
||||
{
|
||||
new_object = JsLib.addObject(objectView)
|
||||
new_object = JsLib.parseForm(objectView)
|
||||
object_model.addObject(new_object, 0)
|
||||
appLoader.source = "ObjectTable.qml"
|
||||
}
|
||||
else
|
||||
{
|
||||
new_object = JsLib.addObject(objectView)
|
||||
var new_objecto = JsLib.addObject(addObjectLayout)
|
||||
new_object = JsLib.parseForm(objectView)
|
||||
var new_objecto = JsLib.parseForm(addObjectLayout)
|
||||
objecto_model.addObject(new_objecto)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,23 @@ GridLayout
|
||||
{
|
||||
id: bankAccount
|
||||
columns: 2
|
||||
property alias jobstatus: title
|
||||
property alias longest: longest
|
||||
Label
|
||||
{
|
||||
id: longest
|
||||
text: qsTr("Beschäftigungsverhältnis")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
ComboBox
|
||||
{
|
||||
property string name: "jobstatus"
|
||||
id: title
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: [qsTr("Vollzeit"), qsTr("Teilzeit"), qsTr("Minijob"), qsTr("Ausgeschieden")]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("IBAN")
|
||||
@@ -13,28 +30,22 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "iban"
|
||||
id: iban
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Bank")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
}
|
||||
TextField
|
||||
ComboBox
|
||||
{
|
||||
property string name: "bank"
|
||||
id: bankname
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
model: ["",qsTr("Sparkasse"),qsTr("Volksbank")]
|
||||
editable: true
|
||||
}
|
||||
function checkBankField()
|
||||
{
|
||||
return (iban.text.trim() && bankname.text.trim())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,122 +10,200 @@ GridLayout
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit Deutsch")
|
||||
Layout.preferredWidth: bankAccount.longest.width
|
||||
text: qsTr("Herkunftsland")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
ButtonGroup
|
||||
ComboBox
|
||||
{
|
||||
buttons: radio.children
|
||||
onClicked:
|
||||
{
|
||||
checkFields()
|
||||
personalData.requiredField()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
id: radio
|
||||
property string name: "country"
|
||||
id: nation
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
RadioButton
|
||||
{
|
||||
|
||||
text: qsTr("Ja")
|
||||
checked: true
|
||||
}
|
||||
|
||||
RadioButton
|
||||
{
|
||||
text: qsTr("Nein")
|
||||
}
|
||||
editable: true
|
||||
model: [qsTr("Deutschland"), qsTr("Syrien")]
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Sozialversicherungs-Nr")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "socialno"
|
||||
id: socialnumber
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Steuer-ID")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "taxno"
|
||||
id: taxnumber
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Krankenkasse")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "medicalinsurance"
|
||||
id: medicalinsurance
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Knappschaft")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: bankAccount.jobstatus.currentText === "Minijob" ? 1:0
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "knappschaft"
|
||||
id: knappschaft
|
||||
Layout.fillWidth: true
|
||||
visible: bankAccount.jobstatus.currentText === "Minijob" ? 1:0
|
||||
}
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausweistyp")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
ComboBox
|
||||
{
|
||||
property string name: "idtype"
|
||||
id: idtype
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
model: [qsTr("Personalausweis"), qsTr("Reisepass")]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausweis Nr.")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "passno"
|
||||
id: passno
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausweis gültig bis")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "passduration"
|
||||
id: passduration
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausstellungsort")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "exhibitionlocation"
|
||||
id: exhibitionlocation
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: test
|
||||
text: qsTr("Ausgestellt am")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "exhibitdate"
|
||||
id: exhibitdate
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Arbeitserlaubnis")
|
||||
visible: radio.children[1].checked
|
||||
Layout.preferredWidth: bankAccount.longest.width
|
||||
property string name: "worklicense"
|
||||
id: worklicense
|
||||
text: qsTr("Arbeitserlaubnis <font color='red'><b>?</b></font>")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit")
|
||||
visible: radio.children[1].checked
|
||||
text: qsTr("Aufenthaltstitel Nr.")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: nationality
|
||||
visible: radio.children[1].checked
|
||||
property string name: "residenceno"
|
||||
id: residenceno
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Pass gültig bis")
|
||||
visible: radio.children[1].checked
|
||||
text: qsTr("Ausgestellt von")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: pass
|
||||
visible: radio.children[1].checked
|
||||
property string name: "residenceissuedloc"
|
||||
id: residenceissuedloc
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Aufenthaltstitel gültig bis")
|
||||
visible: radio.children[1].checked
|
||||
text: qsTr("Ausgestellt am")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: aufenthalt
|
||||
visible: radio.children[1].checked
|
||||
property string name: "residenceissued"
|
||||
id: residenceissued
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Gültig bis")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "residenceexpire"
|
||||
id: residenceexpire
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ GridLayout
|
||||
id: street
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
|
||||
}
|
||||
Label
|
||||
@@ -90,6 +91,11 @@ GridLayout
|
||||
id: houseno
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([0-9a-zA-Z\-]{1,6})/
|
||||
}
|
||||
|
||||
}
|
||||
Label
|
||||
@@ -107,8 +113,8 @@ GridLayout
|
||||
id: postcode
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
onCurrentTextChanged: checkFields()
|
||||
onEditTextChanged: checkFields()
|
||||
onCurrentTextChanged: checkFields()
|
||||
onActivated: currentValue
|
||||
model: address_model
|
||||
textRole: "display"
|
||||
@@ -118,7 +124,7 @@ GridLayout
|
||||
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([0-9]{1,5})/
|
||||
regularExpression: /([^$][0-9]{1,4})/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +150,61 @@ GridLayout
|
||||
currentIndex: -1
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Geburtsname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthname"
|
||||
id: birthname
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Geburtsdatum")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthday"
|
||||
id: birthday
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
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")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "placeofbirth"
|
||||
id: placeofbirth
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
@@ -157,6 +218,11 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -170,6 +236,11 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -183,6 +254,11 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([\+!#$%&‘\*\–\/\=?\^_`\.{|}\~0-9A-Za-z]{1,185})@([0-9A-Za-z\.]{1,64})\.([a-zA-z]{2,5})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -201,6 +277,22 @@ GridLayout
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Stundenlohn")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "salary"
|
||||
id: salary
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Jobbeschreibung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
@@ -214,6 +306,7 @@ GridLayout
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -229,6 +322,11 @@ GridLayout
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
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
|
||||
{
|
||||
@@ -244,21 +342,39 @@ GridLayout
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
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("Arbeitszeiten")
|
||||
text: qsTr("Arbeitszeiten Tage")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
ComboBox
|
||||
{
|
||||
property string name: "timework"
|
||||
id: timetowork
|
||||
property string name: "workdays"
|
||||
id: workdays
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
model: ["1","2","3","4","5","6","7"]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Stunden")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "workhours"
|
||||
id: workhours
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
model: ["1","2","3","4","5","6","7","8"]
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -272,6 +388,7 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
|
||||
Item
|
||||
@@ -287,8 +404,12 @@ GridLayout
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("Mitarbeiter")
|
||||
return (firstname.text.trim() && lastname.text.trim())
|
||||
return (firstname.text.trim() && lastname.text.trim() && street.text.trim() && houseno.text.trim()
|
||||
&& (postcode.editText.trim() || postcode.currentText.trim())
|
||||
&& (city.editText.trim() || city.currentText.trim())
|
||||
&& birthday.text.trim() && phonenumber.text.trim()
|
||||
&& cellphone.text.trim() && email.text.trim() && jobdescription.text.trim()
|
||||
&& workstart.text.trim() && workend.text.trim() && briefAnrede.text.trim())
|
||||
}
|
||||
}
|
||||
function requiredField()
|
||||
@@ -301,7 +422,7 @@ GridLayout
|
||||
jobdescription.placeholderText = pf
|
||||
workstart.placeholderText = pf
|
||||
workend.placeholderText = pf
|
||||
timetowork.placeholderText = pf
|
||||
briefAnrede.placeholderText = pf
|
||||
houseno.placeholderText = pf
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,26 +4,32 @@ import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: applicantVarious
|
||||
columns: 2
|
||||
|
||||
Label
|
||||
{
|
||||
Layout.preferredWidth: bankAccount.longest.width
|
||||
text: qsTr("Grad der Behinderung")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "behinderung"
|
||||
id: behinderung
|
||||
placeholderText: "0,0"
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Disponent")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "disponent"
|
||||
id: disponent
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -31,10 +37,12 @@ GridLayout
|
||||
Label
|
||||
{
|
||||
text: qsTr("Kostenstelle")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "kostenstelle"
|
||||
id: kostenstelle
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -42,10 +50,12 @@ GridLayout
|
||||
Label
|
||||
{
|
||||
text: qsTr("Fremdlohn-Nr.")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "fremdlohn"
|
||||
id: fremdLohnNummer
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
function firstConf(tabs)
|
||||
{
|
||||
let pyqcrm_conf = {};
|
||||
|
||||
pyqcrm_conf[tabs.name] = {}
|
||||
for (var i = 0; i < tabs.children.length; i++)
|
||||
{
|
||||
@@ -17,96 +16,42 @@ function firstConf(tabs)
|
||||
pyqcrm_conf[tabs.name] [tabs.children[i].name] = tabs.children[i].text
|
||||
}
|
||||
}
|
||||
|
||||
return pyqcrm_conf
|
||||
}
|
||||
|
||||
function addBusiness(form)
|
||||
|
||||
function parseForm(...form)
|
||||
{
|
||||
let business_form = {};
|
||||
for (var i = 0; i < form.children.length; i++)
|
||||
let data_form = {};
|
||||
for (var i = 0; i < form.length; i++)
|
||||
{
|
||||
if (form.children[i].toString().startsWith("Combo"))
|
||||
for (var j = 0; j < form[i].children.length; j++)
|
||||
{
|
||||
if(form.children[i].editText)
|
||||
if (form[i].children[j].toString().startsWith("Combo"))
|
||||
{
|
||||
business_form[form.children[i].name] = form.children[i].editText
|
||||
if(form[i].children[j].editText)
|
||||
{
|
||||
data_form[form[i].children[j].name] = form[i].children[j].editText
|
||||
}
|
||||
else
|
||||
{
|
||||
business_form[form.children[i].name] = form.children[i].currentText
|
||||
data_form[form[i].children[j].name] = form[i].children[j].currentText
|
||||
}
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("TextField"))
|
||||
else if (form[i].children[j].toString().startsWith("TextField"))
|
||||
{
|
||||
business_form[form.children[i].name] = form.children[i].text.trim()
|
||||
data_form[form[i].children[j].name] = form[i].children[j].text.trim()
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("Scroll"))
|
||||
else if (form[i].children[j].toString().startsWith("Scroll"))
|
||||
{
|
||||
business_form[form.children[i].contentChildren[0].name] = form.children[i].contentChildren[0].text.trim()
|
||||
data_form[form[i].children[j].contentChildren[0].name] = form[i].children[j].contentChildren[0].text.trim()
|
||||
}
|
||||
else if (form[i].children[j].toString().startsWith("CheckBox"))
|
||||
{
|
||||
data_form[form[i].children[j].name] = form[i].children[j].checked
|
||||
}
|
||||
}
|
||||
return business_form
|
||||
}
|
||||
return data_form
|
||||
}
|
||||
|
||||
function addObject(form)
|
||||
{
|
||||
let object_form = {};
|
||||
for (var i = 0; i < form.children.length; i++)
|
||||
{
|
||||
if (form.children[i].toString().startsWith("Combo"))
|
||||
{
|
||||
if(form.children[i].editText)
|
||||
{
|
||||
object_form[form.children[i].name] = form.children[i].editText
|
||||
}
|
||||
else
|
||||
{
|
||||
object_form[form.children[i].name] = form.children[i].currentText
|
||||
}
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("TextField"))
|
||||
{
|
||||
object_form[form.children[i].name] = form.children[i].text.trim()
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("Scroll"))
|
||||
{
|
||||
object_form[form.children[i].contentChildren[0].name] = form.children[i].contentChildren[0].text.trim()
|
||||
}
|
||||
}
|
||||
return object_form
|
||||
}
|
||||
function addApplicant(form)
|
||||
{
|
||||
let applicant_form = {};
|
||||
for (var i = 0; i < form.children.length; i++)
|
||||
{
|
||||
if (form.children[i].name === "Oschkar")
|
||||
{
|
||||
if(form.children[i].children[0].editText)
|
||||
{
|
||||
applicant_form[form.children[i].children[0].name] = form.children[i].children[0].editText
|
||||
}
|
||||
else
|
||||
{
|
||||
applicant_form[form.children[i].children[0].name] = form.children[i].children[0].currentText
|
||||
}
|
||||
if(form.children[i].children[2].editText)
|
||||
{
|
||||
applicant_form[form.children[i].children[2].name] = form.children[i].children[2].editText
|
||||
}
|
||||
else
|
||||
{
|
||||
applicant_form[form.children[i].children[2].name] = form.children[i].children[2].currentText
|
||||
}
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("TextField"))
|
||||
{
|
||||
applicant_form[form.children[i].name] = form.children[i].text.trim()
|
||||
}
|
||||
}
|
||||
return applicant_form
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user