Added importCountry

This commit is contained in:
2025-01-22 16:52:49 +01:00
parent 180f8e5ae9
commit c2edfab9a2
14 changed files with 17805 additions and 482 deletions

View File

@@ -24,6 +24,12 @@ import QtQuick.Layouts
ButtonGroup
{
buttons: radio.children
onClicked:
{
checkFields()
personalData.requiredField()
}
}
Row
@@ -39,6 +45,7 @@ import QtQuick.Layouts
RadioButton
{
text: qsTr("Mitarbeiter")
}
}
RowLayout
@@ -87,23 +94,16 @@ import QtQuick.Layouts
checked: false
}
CheckBox
{
id: checkbankdata
Layout.fillWidth: true
text: qsTr("Bankdaten")
checked: false
}
ApplicantBankData
{
id: checkbankData
visible: checkbankdata.checked
id: bankAccount
}
ApplicantNationalInsurance
{
id: nationalInsurance
}
ApplicantVarious
@@ -117,10 +117,7 @@ import QtQuick.Layouts
}
}
Item
{
Layout.fillHeight: true
}
RowLayout
{
@@ -153,6 +150,24 @@ import QtQuick.Layouts
// }
}
}
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
}
}
//}

View File

@@ -105,7 +105,7 @@ Frame
Label
{
text: qsTr("Handy")
text: qsTr("Mobil")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
TextField

View File

@@ -4,6 +4,7 @@ import QtQuick.Layouts
GridLayout
{
id: bankAccount
columns: 2
Label
{
@@ -14,6 +15,8 @@ GridLayout
{
id: iban
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
@@ -25,5 +28,13 @@ GridLayout
{
id: bankname
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
function checkBankField()
{
return (iban.text.trim() && bankname.text.trim())
}
}

View File

@@ -1,4 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Label
{

View File

@@ -4,27 +4,40 @@ 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
{
id: radioyes
text: qsTr("Ja")
checked: true
}
RadioButton
{
id: radiono
text: qsTr("Nein")
}
}
@@ -38,6 +51,8 @@ GridLayout
{
id: socialnumber
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
@@ -49,6 +64,8 @@ GridLayout
{
id: taxnumber
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
@@ -60,46 +77,54 @@ GridLayout
{
id: medicalinsurance
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
CheckBox
{
Layout.columnSpan: 2
text: qsTr("Arbeitserlaubnis")
visible: radiono.checked
visible: radio.children[1].checked
}
Label
{
text: qsTr("Staatsangehörigkeit")
visible: radiono.checked
visible: radio.children[1].checked
}
TextField
{
id: nationality
visible: radiono.checked
visible: radio.children[1].checked
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Pass gültig bis")
visible: radiono.checked
visible: radio.children[1].checked
}
TextField
{
id: pass
visible: radiono.checked
visible: radio.children[1].checked
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Aufenthaltstitel gültig bis")
visible: radiono.checked
visible: radio.children[1].checked
}
TextField
{
id: aufenthalt
visible: radiono.checked
visible: radio.children[1].checked
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
}

View File

@@ -32,6 +32,7 @@ GridLayout
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
}
Label
@@ -45,6 +46,7 @@ GridLayout
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
}
Label
@@ -56,6 +58,8 @@ GridLayout
{
id: street
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
@@ -68,6 +72,20 @@ GridLayout
{
id: postcode
Layout.fillWidth: true
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
{
regularExpression: /([0-9]{1,5})/
}
}
@@ -81,6 +99,15 @@ GridLayout
{
id: city
Layout.fillWidth: true
editable: true
onEditTextChanged: checkFields()
onCurrentTextChanged: checkFields()
model: address_model
textRole: "city"
popup.height: 300
popup.y: postcode.y + 5 - (postcode.height * 2)
currentIndex: -1
}
}
Label
@@ -92,6 +119,18 @@ GridLayout
{
id: phonenumber
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
text: qsTr("Mobil")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: cellphone
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
@@ -102,6 +141,7 @@ GridLayout
{
id: email
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
@@ -128,6 +168,7 @@ GridLayout
id: jobdescription
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -140,6 +181,7 @@ GridLayout
id: workstart
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -152,6 +194,7 @@ GridLayout
id: workend
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -164,6 +207,7 @@ GridLayout
id: timetowork
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -174,6 +218,7 @@ GridLayout
{
id: briefAnrede
Layout.fillWidth: true
placeholderTextColor: "red"
}
Item
@@ -181,5 +226,29 @@ GridLayout
Layout.fillHeight: true
Layout.columnSpan: 2
}
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
}
}

View File

@@ -149,7 +149,7 @@ GridLayout
Label
{
text: qsTr("Handy")
text: qsTr("Mobil")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
TextField