changed jobstatus, country in AddApplicant
This commit is contained in:
@@ -87,14 +87,6 @@ import "../js/qmldict.js" as JsLib
|
|||||||
// visible: checkcontactdata.checked
|
// visible: checkcontactdata.checked
|
||||||
// }
|
// }
|
||||||
|
|
||||||
CheckBox
|
|
||||||
{
|
|
||||||
id: miniJobber
|
|
||||||
Layout.fillWidth: true
|
|
||||||
text: qsTr("Minijob")
|
|
||||||
checked: false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ApplicantBankData
|
ApplicantBankData
|
||||||
@@ -109,10 +101,7 @@ import "../js/qmldict.js" as JsLib
|
|||||||
|
|
||||||
ApplicantVarious
|
ApplicantVarious
|
||||||
{
|
{
|
||||||
// Layout.margins:
|
id: applicantVarious
|
||||||
// {
|
|
||||||
// top: 30
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,24 +120,28 @@ import "../js/qmldict.js" as JsLib
|
|||||||
}
|
}
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
|
|
||||||
id: saveBtn
|
id: saveBtn
|
||||||
text: qsTr("Speichern")
|
text: qsTr("Speichern")
|
||||||
enabled: false
|
enabled: false
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
var new_applicant
|
||||||
if (radio.children[0].checked)
|
if (radio.children[0].checked)
|
||||||
{
|
{
|
||||||
var new_applicant = JsLib.addApplicant(personalData)
|
new_applicant = JsLib.parseForm(personalData)
|
||||||
// business_model.addApplicant(new_business, 0)
|
// business_model.addApplicant(new_business, 0)
|
||||||
// appLoader.source = "EmployeeTable.qml"
|
// appLoader.source = "EmployeeTable.qml"
|
||||||
console.log(JSON.stringify (new_applicant))
|
console.log(JSON.stringify (new_applicant))
|
||||||
}
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// new_applicant = JsLib.addApplicant(customerView)
|
// console.log(personalData, bankAccount, nationalInsurance, applicantVarious)
|
||||||
|
new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious)
|
||||||
// var new_contact = JsLib.addApplicant(addContactLayout)
|
// var new_contact = JsLib.addApplicant(addContactLayout)
|
||||||
// contact_model.addContact(new_contact)
|
// contact_model.addContact(new_contact)
|
||||||
// }
|
console.log(JSON.stringify (new_applicant))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,14 +71,14 @@ ColumnLayout
|
|||||||
{
|
{
|
||||||
if (!checkAddContact.checked)
|
if (!checkAddContact.checked)
|
||||||
{
|
{
|
||||||
new_business = JsLib.addBusiness(customerView)
|
new_business = JsLib.parseForm(customerView)
|
||||||
business_model.addBusiness(new_business, 0)
|
business_model.addBusiness(new_business, 0)
|
||||||
appLoader.source = "CustomerTable.qml"
|
appLoader.source = "CustomerTable.qml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_business = JsLib.addBusiness(customerView)
|
new_business = JsLib.parseForm(customerView)
|
||||||
var new_contact = JsLib.addBusiness(addContactFrame.contactGrid)
|
var new_contact = JsLib.parseForm(addContactFrame.contactGrid)
|
||||||
contact_model.addContact(new_contact)
|
contact_model.addContact(new_contact)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,14 +72,14 @@ ColumnLayout
|
|||||||
{
|
{
|
||||||
if (!checkAddObject.checked)
|
if (!checkAddObject.checked)
|
||||||
{
|
{
|
||||||
new_object = JsLib.addObject(objectView)
|
new_object = JsLib.parseForm(objectView)
|
||||||
object_model.addObject(new_object, 0)
|
object_model.addObject(new_object, 0)
|
||||||
appLoader.source = "ObjectTable.qml"
|
appLoader.source = "ObjectTable.qml"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_object = JsLib.addObject(objectView)
|
new_object = JsLib.parseForm(objectView)
|
||||||
var new_objecto = JsLib.addObject(addObjectLayout)
|
var new_objecto = JsLib.parseForm(addObjectLayout)
|
||||||
objecto_model.addObject(new_objecto)
|
objecto_model.addObject(new_objecto)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,27 @@ GridLayout
|
|||||||
id: bankAccount
|
id: bankAccount
|
||||||
columns: 2
|
columns: 2
|
||||||
Label
|
Label
|
||||||
|
{
|
||||||
|
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")
|
text: qsTr("IBAN")
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "iban"
|
||||||
id: iban
|
id: iban
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
@@ -24,16 +39,18 @@ GridLayout
|
|||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
}
|
}
|
||||||
TextField
|
ComboBox
|
||||||
{
|
{
|
||||||
|
property string name: "bank"
|
||||||
id: bankname
|
id: bankname
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
model: [qsTr("Sparkasse"),qsTr("Volksbank")]
|
||||||
placeholderTextColor: "red"
|
|
||||||
}
|
}
|
||||||
function checkBankField()
|
function checkBankField()
|
||||||
{
|
{
|
||||||
return (iban.text.trim() && bankname.text.trim())
|
// return (iban.text.trim() && bankname.text.trim())
|
||||||
|
return (iban.text.trim())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,36 +10,16 @@ GridLayout
|
|||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Staatsangehörigkeit Deutsch")
|
text: qsTr("Herkunftsland")
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonGroup
|
ComboBox
|
||||||
{
|
{
|
||||||
buttons: radio.children
|
property string name: "country"
|
||||||
onClicked:
|
id: nation
|
||||||
{
|
|
||||||
checkFields()
|
|
||||||
personalData.requiredField()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Row
|
|
||||||
{
|
|
||||||
id: radio
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignLeft
|
editable: true
|
||||||
RadioButton
|
model: [qsTr("Deutschland"), qsTr("Syrien")]
|
||||||
{
|
|
||||||
|
|
||||||
text: qsTr("Ja")
|
|
||||||
checked: true
|
|
||||||
}
|
|
||||||
|
|
||||||
RadioButton
|
|
||||||
{
|
|
||||||
text: qsTr("Nein")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
@@ -49,6 +29,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "socialno"
|
||||||
id: socialnumber
|
id: socialnumber
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
@@ -62,6 +43,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "taxno"
|
||||||
id: taxnumber
|
id: taxnumber
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
@@ -75,6 +57,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "medicalinsurance"
|
||||||
id: medicalinsurance
|
id: medicalinsurance
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
@@ -83,19 +66,21 @@ GridLayout
|
|||||||
|
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
|
property string name: "worklicense"
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
text: qsTr("Arbeitserlaubnis")
|
text: qsTr("Arbeitserlaubnis")
|
||||||
visible: radio.children[1].checked
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Staatsangehörigkeit")
|
text: qsTr("Staatsangehörigkeit")
|
||||||
visible: radio.children[1].checked
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "nationality"
|
||||||
id: nationality
|
id: nationality
|
||||||
visible: radio.children[1].checked
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
placeholderTextColor: "red"
|
placeholderTextColor: "red"
|
||||||
@@ -103,12 +88,13 @@ GridLayout
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Pass gültig bis")
|
text: qsTr("Pass gültig bis")
|
||||||
visible: radio.children[1].checked
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
id: pass
|
property string name: "passduration"
|
||||||
visible: radio.children[1].checked
|
id: passduration
|
||||||
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
placeholderTextColor: "red"
|
placeholderTextColor: "red"
|
||||||
@@ -116,12 +102,13 @@ GridLayout
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: qsTr("Aufenthaltstitel gültig bis")
|
text: qsTr("Aufenthaltstitel gültig bis")
|
||||||
visible: radio.children[1].checked
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
}
|
}
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "aufenthalt"
|
||||||
id: aufenthalt
|
id: aufenthalt
|
||||||
visible: radio.children[1].checked
|
visible: nation.currentText === "Deutschland"? false:true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: "Pflichtfeld"
|
placeholderText: "Pflichtfeld"
|
||||||
placeholderTextColor: "red"
|
placeholderTextColor: "red"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts
|
|||||||
|
|
||||||
GridLayout
|
GridLayout
|
||||||
{
|
{
|
||||||
|
id: applicantVarious
|
||||||
columns: 2
|
columns: 2
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
@@ -12,6 +13,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "behinderung"
|
||||||
id: behinderung
|
id: behinderung
|
||||||
placeholderText: "0,0"
|
placeholderText: "0,0"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -24,6 +26,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "disponent"
|
||||||
id: disponent
|
id: disponent
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
@@ -35,6 +38,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "kostenstelle"
|
||||||
id: kostenstelle
|
id: kostenstelle
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
@@ -46,6 +50,7 @@ GridLayout
|
|||||||
|
|
||||||
TextField
|
TextField
|
||||||
{
|
{
|
||||||
|
property string name: "fremdlohn"
|
||||||
id: fremdLohnNummer
|
id: fremdLohnNummer
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
function firstConf(tabs)
|
function firstConf(tabs)
|
||||||
{
|
{
|
||||||
let pyqcrm_conf = {};
|
let pyqcrm_conf = {};
|
||||||
|
|
||||||
pyqcrm_conf[tabs.name] = {}
|
pyqcrm_conf[tabs.name] = {}
|
||||||
for (var i = 0; i < tabs.children.length; i++)
|
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
|
pyqcrm_conf[tabs.name] [tabs.children[i].name] = tabs.children[i].text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pyqcrm_conf
|
return pyqcrm_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
function addBusiness(form)
|
|
||||||
|
function parseForm(...form)
|
||||||
{
|
{
|
||||||
let business_form = {};
|
let data_form = {};
|
||||||
for (var i = 0; i < form.children.length; i++)
|
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
|
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