GUI in frames and other applicant-related stuff

This commit is contained in:
2025-01-16 11:17:57 +01:00
parent f035f60910
commit e94a9f9900
15 changed files with 534 additions and 223 deletions

View File

@@ -2,8 +2,16 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
ColumnLayout // ScrollView
{ // {
// anchors.fill: parent
// ScrollBar.vertical: ScrollBar
// {
// policy: ScrollBar.AlwaysOn
// }
ColumnLayout
{
id: colPar
anchors.fill: parent anchors.fill: parent
Label Label
{ {
@@ -13,65 +21,144 @@ ColumnLayout
font.pixelSize: 35 font.pixelSize: 35
} }
ButtonGroup
{
buttons: radio.children
}
Row
{
Layout.fillWidth: true
id: radio
Layout.columnSpan: 2
RadioButton
{
checked: true
text: qsTr("Bewerber")
}
RadioButton
{
text: qsTr("Mitarbeiter")
}
}
RowLayout RowLayout
{ {
Layout.fillWidth: true
spacing: 50
Frame
{
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true Layout.fillWidth: true
ApplicantPersonalData ApplicantPersonalData
{ {
id: personalData id: personalData
width: parent.width
} }
}
Frame
{
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
visible: radio.children[1].checked
ColumnLayout ColumnLayout
{ {
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
CheckBox width: parent.width
{ // CheckBox
id: checkcontactdata // {
Layout.fillWidth: true // id: checkcontactdata
text: qsTr("Kontaktdaten") // Layout.fillWidth: true
checked: false // text: qsTr("Kontaktdaten")
onCheckStateChanged: // checked: false
{ // }
contactData.visible = checked
} // ApplicantContactData
} // {
ApplicantContactData // visible: checkcontactdata.checked
{ // }
id: contactData
visible: false
}
CheckBox CheckBox
{ {
id: checkbankdata id: checkbankdata
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Bankdaten") text: qsTr("Bankdaten")
checked: false checked: false
onCheckStateChanged:
{
bankData.visible = checked
}
} }
ApplicantBankData ApplicantBankData
{ {
id: bankData id: checkbankData
visible: false visible: checkbankdata.checked
} }
ApplicantNationality
ApplicantNationalInsurance
{ {
} }
CheckBox
{
id: miniJobber
Layout.fillWidth: true
text: qsTr("Minijob")
checked: false
} }
ApplicantMiniJob
{
id: miniJob
visible: miniJobber.checked
} }
ApplicantVarious
{
// Layout.margins:
// {
// top: 30
// }
}
}
}
}
Item Item
{ {
Layout.fillHeight: true Layout.fillHeight: true
} }
}
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)
// }
// }
}
}
}
//}

View File

@@ -2,15 +2,19 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
Frame
{
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
GridLayout GridLayout
{ {
id: addContactLayout id: addContactLayout
Layout.fillWidth: true anchors.fill: parent
Layout.fillHeight: true // Layout.fillWidth: true
Layout.alignment: Qt.AlignTop // Layout.fillHeight: true
// Layout.alignment: Qt.AlignTop
columns: 2 columns: 2
rowSpacing: 9 rowSpacing: 9
visible: false
property alias fname: firstname property alias fname: firstname
property alias lname: lastname property alias lname: lastname
@@ -195,3 +199,4 @@ GridLayout
} }
} }
} }
}

View File

@@ -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
{
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
CustomerView CustomerView
{ {
id: customerView id: customerView
width: parent.width
}
} }
AddContact AddContact
{ {
id: addContactLayout //id: addContactLayout
visible: checkAddContact.checked
} }
} }
RowLayout RowLayout

View File

@@ -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
Frame
{
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
ObjectView ObjectView
{ {
id: objectView id: objectView
width: parent.width
}
} }
ObjectAddOns ObjectAddOns
{ {
id: addObjectLayout id: addObjectLayout
visible: checkAddObject.checked
} }
} }
RowLayout RowLayout

View File

@@ -0,0 +1,50 @@
import QtQuick
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")]
}

View File

@@ -23,9 +23,6 @@ GridLayout
} }
RowLayout RowLayout
{ {
ComboBox ComboBox
{ {
id: postcode id: postcode

19
Gui/ApplicantMiniJob.qml Normal file
View 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
}
}

View File

@@ -0,0 +1,106 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
GridLayout
{
columns: 2
Label
{
text: qsTr("Staatsangehörigkeit Deutsch")
}
Row
{
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft
RadioButton
{
id: radioyes
text: qsTr("Ja")
checked: true
}
RadioButton
{
id: radiono
text: qsTr("Nein")
}
}
Label
{
text: qsTr("Sozialversicherungs-Nr")
}
TextField
{
id: socialnumber
Layout.fillWidth: true
}
Label
{
text: qsTr("Steuer-ID")
}
TextField
{
id: taxnumber
Layout.fillWidth: true
}
Label
{
text: qsTr("Krankenkasse")
}
TextField
{
id: medicalinsurance
Layout.fillWidth: true
}
CheckBox
{
Layout.columnSpan: 2
text: qsTr("Arbeitserlaubnis")
visible: radiono.checked
}
Label
{
text: qsTr("Staatsangehörigkeit")
visible: radiono.checked
}
TextField
{
id: nationality
visible: radiono.checked
Layout.fillWidth: true
}
Label
{
text: qsTr("Pass gültig bis")
visible: radiono.checked
}
TextField
{
id: pass
visible: radiono.checked
Layout.fillWidth: true
}
Label
{
text: qsTr("Aufenthaltstitel gültig bis")
visible: radiono.checked
}
TextField
{
id: aufenthalt
visible: radiono.checked
Layout.fillWidth: true
}
}

View File

@@ -2,62 +2,6 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
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
visible: radiono.checked
GridLayout
{
columns: 2
CheckBox CheckBox
{ {
Layout.columnSpan: 2 Layout.columnSpan: 2
@@ -70,6 +14,7 @@ GridLayout
TextField TextField
{ {
id: nationality id: nationality
} }
Label Label
{ {
@@ -78,6 +23,7 @@ GridLayout
TextField TextField
{ {
id: pass id: pass
} }
Label Label
{ {
@@ -86,7 +32,6 @@ GridLayout
TextField TextField
{ {
id: aufenthalt id: aufenthalt
} }
}
}
}

View File

@@ -7,30 +7,10 @@ GridLayout
id: personalData id: personalData
columns: 2 columns: 2
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,12 @@ 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 + ","
} }
Label Label
{ {
text: qsTr("Vorname") text: qsTr("Vorname")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
@@ -54,6 +36,7 @@ GridLayout
Label Label
{ {
text: qsTr("Nachname") text: qsTr("Nachname")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
@@ -65,54 +48,65 @@ GridLayout
} }
Label Label
{ {
text: qsTr("Geburtsname") text: qsTr("Straße")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: birthname id: street
Layout.fillWidth: true Layout.fillWidth: true
} }
Label Label
{ {
text: qsTr("Geburtsdatum") text: qsTr("PLZ")
Layout.alignment: Qt.AlignRight
} }
TextField RowLayout
{ {
id: birthday ComboBox
{
id: postcode
Layout.fillWidth: true 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 Label
{ {
text: qsTr("Geburtsort") text: qsTr("Ort")
} Layout.alignment: Qt.AlignRight
TextField
{
id: placeofbirth
Layout.fillWidth: true
} }
Label
{
text: qsTr("Geschlecht")
}
ComboBox ComboBox
{ {
id: gender id: city
Layout.fillWidth: true
}
}
Label
{
text: qsTr("Telefonnummer")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: phonenumber
Layout.fillWidth: true
}
Label
{
text: qsTr("E-Mail")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: email
Layout.fillWidth: true Layout.fillWidth: true
editable: false
model: [qsTr("Mann"), qsTr("Frau"), qsTr("Divers")]
} }
Label Label
{ {
text: qsTr("Familienstand") text: qsTr("Familienstand")
Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked
} }
ComboBox ComboBox
{ {
@@ -120,46 +114,71 @@ 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
} }
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
} }
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
} }
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
} }
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
}
Label
{
text: qsTr("Briefanrede")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: briefAnrede
Layout.fillWidth: true
}
Item
{
Layout.fillHeight: true
Layout.columnSpan: 2
} }
} }

53
Gui/ApplicantVarious.qml Normal file
View 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
}
}

View File

@@ -13,6 +13,16 @@ Item {
anchors.margins: 9 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 ColumnLayout
{ {
anchors anchors
@@ -94,7 +104,7 @@ Item {
Text Text
{ {
Layout.fillWidth: true Layout.fillWidth: true
text: model.display text: model.display? model.display: ""
} }

View File

@@ -1,11 +1,15 @@
import QtQuick import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls
ColumnLayout Frame
{ {
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
ColumnLayout
{
id: addObjectLayout id: addObjectLayout
visible: false width: parent.width
ObjectAddOnEmployee ObjectAddOnEmployee
{ {
id: oaoemployee id: oaoemployee
@@ -18,4 +22,5 @@ ColumnLayout
{ {
Layout.fillHeight: true Layout.fillHeight: true
} }
}
} }

View File

@@ -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"
} }
} }

View File

@@ -29,5 +29,9 @@
<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>
</qresource> </qresource>
</RCC> </RCC>