changed jobstatus, country in AddApplicant
This commit is contained in:
@@ -87,14 +87,6 @@ import "../js/qmldict.js" as JsLib
|
||||
// visible: checkcontactdata.checked
|
||||
// }
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: miniJobber
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Minijob")
|
||||
checked: false
|
||||
}
|
||||
|
||||
|
||||
|
||||
ApplicantBankData
|
||||
@@ -109,10 +101,7 @@ import "../js/qmldict.js" as JsLib
|
||||
|
||||
ApplicantVarious
|
||||
{
|
||||
// Layout.margins:
|
||||
// {
|
||||
// top: 30
|
||||
// }
|
||||
id: applicantVarious
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,24 +120,28 @@ import "../js/qmldict.js" as JsLib
|
||||
}
|
||||
Button
|
||||
{
|
||||
|
||||
id: saveBtn
|
||||
text: qsTr("Speichern")
|
||||
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)
|
||||
// var new_contact = JsLib.addApplicant(addContactLayout)
|
||||
// contact_model.addContact(new_contact)
|
||||
// }
|
||||
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))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,27 @@ GridLayout
|
||||
id: bankAccount
|
||||
columns: 2
|
||||
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")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "iban"
|
||||
id: iban
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
@@ -24,16 +39,18 @@ GridLayout
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
}
|
||||
TextField
|
||||
ComboBox
|
||||
{
|
||||
property string name: "bank"
|
||||
id: bankname
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
model: [qsTr("Sparkasse"),qsTr("Volksbank")]
|
||||
|
||||
}
|
||||
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
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit Deutsch")
|
||||
text: qsTr("Herkunftsland")
|
||||
}
|
||||
|
||||
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
|
||||
@@ -49,6 +29,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "socialno"
|
||||
id: socialnumber
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
@@ -62,6 +43,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "taxno"
|
||||
id: taxnumber
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
@@ -75,6 +57,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "medicalinsurance"
|
||||
id: medicalinsurance
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
@@ -83,19 +66,21 @@ GridLayout
|
||||
|
||||
CheckBox
|
||||
{
|
||||
property string name: "worklicense"
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Arbeitserlaubnis")
|
||||
visible: radio.children[1].checked
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit")
|
||||
visible: radio.children[1].checked
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "nationality"
|
||||
id: nationality
|
||||
visible: radio.children[1].checked
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
@@ -103,12 +88,13 @@ GridLayout
|
||||
Label
|
||||
{
|
||||
text: qsTr("Pass gültig bis")
|
||||
visible: radio.children[1].checked
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: pass
|
||||
visible: radio.children[1].checked
|
||||
property string name: "passduration"
|
||||
id: passduration
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
@@ -116,12 +102,13 @@ GridLayout
|
||||
Label
|
||||
{
|
||||
text: qsTr("Aufenthaltstitel gültig bis")
|
||||
visible: radio.children[1].checked
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "aufenthalt"
|
||||
id: aufenthalt
|
||||
visible: radio.children[1].checked
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
|
||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: applicantVarious
|
||||
columns: 2
|
||||
Label
|
||||
{
|
||||
@@ -12,6 +13,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "behinderung"
|
||||
id: behinderung
|
||||
placeholderText: "0,0"
|
||||
Layout.fillWidth: true
|
||||
@@ -24,6 +26,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "disponent"
|
||||
id: disponent
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -35,6 +38,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "kostenstelle"
|
||||
id: kostenstelle
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -46,6 +50,7 @@ GridLayout
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "fremdlohn"
|
||||
id: fremdLohnNummer
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
105
js/qmldict.js
105
js/qmldict.js
@@ -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
|
||||
{
|
||||
data_form[form[i].children[j].name] = form[i].children[j].currentText
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (form[i].children[j].toString().startsWith("TextField"))
|
||||
{
|
||||
business_form[form.children[i].name] = form.children[i].currentText
|
||||
data_form[form[i].children[j].name] = form[i].children[j].text.trim()
|
||||
}
|
||||
else if (form[i].children[j].toString().startsWith("Scroll"))
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("TextField"))
|
||||
{
|
||||
business_form[form.children[i].name] = form.children[i].text.trim()
|
||||
}
|
||||
else if (form.children[i].toString().startsWith("Scroll"))
|
||||
{
|
||||
business_form[form.children[i].contentChildren[0].name] = form.children[i].contentChildren[0].text.trim()
|
||||
}
|
||||
}
|
||||
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