Compare commits
6 Commits
8f41c240ac
...
f035f60910
| Author | SHA256 | Date | |
|---|---|---|---|
| f035f60910 | |||
| f2969aeafe | |||
| 3fc795f962 | |||
| 416b9cb5b1 | |||
| 3eadad5d5b | |||
| 80a269a729 |
77
Gui/AddApplicant.qml
Normal file
77
Gui/AddApplicant.qml
Normal file
@@ -0,0 +1,77 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
anchors.fill: parent
|
||||
Label
|
||||
{
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
id: headline
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
font.pixelSize: 35
|
||||
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
ApplicantPersonalData
|
||||
{
|
||||
id: personalData
|
||||
|
||||
}
|
||||
ColumnLayout
|
||||
{
|
||||
Layout.alignment: Qt.AlignTop
|
||||
CheckBox
|
||||
{
|
||||
id: checkcontactdata
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Kontaktdaten")
|
||||
checked: false
|
||||
onCheckStateChanged:
|
||||
{
|
||||
contactData.visible = checked
|
||||
}
|
||||
}
|
||||
ApplicantContactData
|
||||
{
|
||||
id: contactData
|
||||
visible: false
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
id: checkbankdata
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Bankdaten")
|
||||
checked: false
|
||||
onCheckStateChanged:
|
||||
{
|
||||
bankData.visible = checked
|
||||
}
|
||||
}
|
||||
ApplicantBankData
|
||||
{
|
||||
id: bankData
|
||||
visible: false
|
||||
}
|
||||
ApplicantNationality
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
ApplicationWindow
|
||||
{
|
||||
id: addmitarbeiter
|
||||
id: addMitarbeiter
|
||||
title: qsTr("Objekt - Neuer Mitarbeiter")
|
||||
|
||||
ColumnLayout
|
||||
@@ -31,6 +31,7 @@ ApplicationWindow
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: assignee
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
@@ -40,6 +41,7 @@ ApplicationWindow
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: wage
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
@@ -49,6 +51,7 @@ ApplicationWindow
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: duration
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
@@ -58,6 +61,7 @@ ApplicationWindow
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: cleanDays
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
@@ -67,6 +71,7 @@ ApplicationWindow
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: tasks
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
@@ -76,6 +81,7 @@ ApplicationWindow
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: output
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
@@ -90,11 +96,30 @@ ApplicationWindow
|
||||
Button
|
||||
{
|
||||
text: qsTr("Abbrechen")
|
||||
onClicked: addMitarbeiter.close()
|
||||
}
|
||||
Button
|
||||
{
|
||||
text: qsTr("Hinzufügen")
|
||||
onClicked:
|
||||
{
|
||||
if (assignee.text.trim() !== "" && duration.text.trim() !== "" && wage.text.trim() !== "" && cleanDays.text.trim() !== "" && tasks.text.trim() !== "" && output.text.trim() !== "")
|
||||
{
|
||||
var ne = {
|
||||
"assignee": assignee.text.trim(),
|
||||
"duration": duration.text.trim(),
|
||||
"wage": wage.text.trim(),
|
||||
"cleandays": cleanDays.text.trim(),
|
||||
"tasks": tasks.text.trim(),
|
||||
"output": output.text.trim(),
|
||||
};
|
||||
addMitarbeiter.addNewEmployee(ne)
|
||||
addMitarbeiter.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signal addNewEmployee(var new_employee)
|
||||
}
|
||||
|
||||
29
Gui/ApplicantBankData.qml
Normal file
29
Gui/ApplicantBankData.qml
Normal file
@@ -0,0 +1,29 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
columns: 2
|
||||
Label
|
||||
{
|
||||
text: qsTr("IBAN")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: iban
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Bank")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: bankname
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
67
Gui/ApplicantContactData.qml
Normal file
67
Gui/ApplicantContactData.qml
Normal file
@@ -0,0 +1,67 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: contactData
|
||||
columns: 2
|
||||
Label
|
||||
{
|
||||
text: qsTr("Straße")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: street
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("PLZ")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
|
||||
|
||||
|
||||
ComboBox
|
||||
{
|
||||
id: postcode
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ort")
|
||||
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
92
Gui/ApplicantNationality.qml
Normal file
92
Gui/ApplicantNationality.qml
Normal file
@@ -0,0 +1,92 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
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
|
||||
{
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Arbeitserlaubnis")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: nationality
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Pass gültig bis")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: pass
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Aufenthaltstitel gültig bis")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: aufenthalt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
165
Gui/ApplicantPersonalData.qml
Normal file
165
Gui/ApplicantPersonalData.qml
Normal file
@@ -0,0 +1,165 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: personalData
|
||||
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
|
||||
{
|
||||
text: qsTr("Anrede")
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: title
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: [qsTr("Herr"), qsTr("Frau")]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Vorname")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: firstname
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Nachname")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: lastname
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
|
||||
}
|
||||
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")]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Familienstand")
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
id: maritalstatus
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: [qsTr("ledig"), qsTr("verheiratet"), qsTr("verwitwet"), qsTr("geschieden")]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Jobbeschreibung")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: jobdescription
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Arbeitsbeginn")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: workstart
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Bei Befristung Ende")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: workend
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Arbeitszeiten")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: timetowork
|
||||
Layout.fillWidth: true
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import QtQuick.Controls
|
||||
|
||||
GridLayout
|
||||
{
|
||||
property var contacts: null
|
||||
columns: 2
|
||||
|
||||
CheckBox
|
||||
@@ -11,14 +12,6 @@ GridLayout
|
||||
id: contactperson
|
||||
text: qsTr("Ansprechpartner")
|
||||
Layout.columnSpan: 2
|
||||
onCheckStateChanged:
|
||||
{
|
||||
title.enabled = contactperson.checked
|
||||
firstname.enabled = contactperson.checked
|
||||
lastname.enabled = contactperson.checked
|
||||
phonenumber.enabled = contactperson.checked
|
||||
posizion.enabled = contactperson.checked
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -30,7 +23,7 @@ GridLayout
|
||||
id: title
|
||||
model: [qsTr("Herr"),qsTr("Frau")]
|
||||
Layout.fillWidth: true
|
||||
enabled: false
|
||||
enabled: contactperson.checked
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -43,7 +36,7 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
enabled: false
|
||||
enabled: contactperson.checked
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -56,7 +49,7 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
enabled: false
|
||||
enabled: contactperson.checked
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -69,7 +62,7 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
enabled: false
|
||||
enabled: contactperson.checked
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -82,8 +75,147 @@ GridLayout
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
enabled: false
|
||||
enabled: contactperson.checked
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.columnSpan: 2
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: removeContact
|
||||
text: qsTr("Entfernen")
|
||||
enabled: contactperson.checked
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: addContact
|
||||
text: qsTr("Hinzufügen")
|
||||
enabled: contactperson.checked
|
||||
onClicked:
|
||||
{
|
||||
var num_contacts = 0
|
||||
if (contacts !== null && contacts !== undefined) num_contacts = Object.keys(contacts).length
|
||||
else contacts = {}
|
||||
if (num_contacts < 3 && firstname.text.trim() !== "" && lastname.text.trim() !== "" && phonenumber.text.trim() !== "" && posizion.text.trim() !== "")
|
||||
{
|
||||
contacts[num_contacts] = {}
|
||||
contacts[num_contacts]["title"] = title.currentText
|
||||
contacts[num_contacts]["fname"] = firstname.text.trim()
|
||||
contacts[num_contacts]["lname"] = lastname.text.trim()
|
||||
contacts[num_contacts]["phone"] = phonenumber.text.trim()
|
||||
contacts[num_contacts]["position"] = posizion.text.trim()
|
||||
|
||||
contactModel.append({name: title.currentText + " " + firstname.text.trim() + " " + lastname.text.trim(), phone: phonenumber.text.trim(), posizion: posizion.text.trim()})
|
||||
|
||||
firstname.text = ""
|
||||
lastname.text = ""
|
||||
phonenumber.text = ""
|
||||
posizion.text = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ansprechpartner")
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||
}
|
||||
|
||||
ListModel
|
||||
{
|
||||
id: contactModel
|
||||
}
|
||||
|
||||
Component
|
||||
{
|
||||
id: headline
|
||||
Row
|
||||
{
|
||||
Text
|
||||
{
|
||||
id: cpname
|
||||
text: qsTr("Name")
|
||||
width: 175
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: "black"
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: cpphone
|
||||
text: qsTr("Telefon")
|
||||
width: 100
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: "black"
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
id: cppos
|
||||
text: qsTr("Position")
|
||||
width: 150
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: "black"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: 100
|
||||
color: firstname.palette.base
|
||||
border.color: firstname.activeFocus? firstname.palette.highlight: firstname.palette.base
|
||||
ListView
|
||||
{
|
||||
id: contactView
|
||||
implicitHeight: parent.height
|
||||
model: contactModel
|
||||
|
||||
header: headline
|
||||
|
||||
delegate: Item
|
||||
{
|
||||
width: parent.width
|
||||
height: 15
|
||||
|
||||
Row
|
||||
{
|
||||
//spacing: 9
|
||||
Text
|
||||
{
|
||||
text: model.name
|
||||
width: 175
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
Text
|
||||
{
|
||||
text: model.phone
|
||||
width: 100
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
Text
|
||||
{
|
||||
text: model.posizion
|
||||
width: 150
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,50 +4,125 @@ import QtQuick.Controls
|
||||
|
||||
GridLayout
|
||||
{
|
||||
property var employeeForm: null
|
||||
property var employees: null
|
||||
id: oaoemployee
|
||||
columns: 2
|
||||
rows: 4
|
||||
Label
|
||||
{
|
||||
text: qsTr("Mitarbeiter")
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||
}
|
||||
ScrollView
|
||||
{
|
||||
Layout.rowSpan: 3
|
||||
Layout.fillWidth: true
|
||||
|
||||
TextArea
|
||||
ListModel
|
||||
{
|
||||
id: mitarbeitertext
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: 100
|
||||
wrapMode: TextEdit.Wrap
|
||||
background: Rectangle
|
||||
id: employeeModel
|
||||
}
|
||||
|
||||
Component
|
||||
{
|
||||
id: employeesHeader
|
||||
Row
|
||||
{
|
||||
Text
|
||||
{
|
||||
id: empName
|
||||
text: qsTr("Mitarbeiter")
|
||||
width: 175
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: "yellow"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: 75
|
||||
Layout.rowSpan: 2
|
||||
color: mitarbeiterhin.palette.base
|
||||
border.color: mitarbeiterhin.activeFocus? mitarbeiterhin.palette.highlight: mitarbeiterhin.palette.base
|
||||
ListView
|
||||
{
|
||||
id: employeesList
|
||||
//anchors.fill: parent
|
||||
implicitHeight: parent.height
|
||||
|
||||
model: employeeModel
|
||||
|
||||
header: employeesHeader
|
||||
|
||||
delegate: Row
|
||||
{
|
||||
width: 200
|
||||
height: 15
|
||||
padding: 7
|
||||
Text
|
||||
{
|
||||
text: model.namens
|
||||
color: "yellow"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: mitarbeiterraus
|
||||
text: qsTr("Mitarbeiter entfernen")
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: mitarbeiterhin
|
||||
property var neuermitarbeiter: undefined
|
||||
text: qsTr("Mitarbeiter hinzufügen")
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.maximumWidth: mitarbeitertext.width
|
||||
onClicked:
|
||||
{
|
||||
var nm = Qt.createComponent("AddObjectEmployee.qml")
|
||||
if (nm.status === Component.Ready)
|
||||
{
|
||||
neuermitarbeiter = nm.createObject (appWindow, {width: 600, height: 400})
|
||||
neuermitarbeiter.show()
|
||||
employeeForm = nm.createObject (appWindow, {width: 600, height: 400})
|
||||
employeeForm.addNewEmployee.connect(onAddEmployee)
|
||||
employeeForm.show()
|
||||
}
|
||||
else console.log(nm.errorString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onAddEmployee(new_employee)
|
||||
{
|
||||
var num_employees = 0
|
||||
|
||||
if (employees === null || employees === undefined) employees = {}
|
||||
else num_employees = Object.keys(employees).length;
|
||||
|
||||
employees[num_employees] = {}
|
||||
employees[num_employees]["assignee"] = new_employee["assignee"];
|
||||
employees[num_employees]["duration"] = new_employee["duration"];
|
||||
employees[num_employees]["wage"] = new_employee["wage"];
|
||||
employees[num_employees]["cleandays"] = new_employee["cleandays"];
|
||||
employees[num_employees]["tasks"] = new_employee["tasks"];
|
||||
employees[num_employees]["output"] = new_employee["output"];
|
||||
|
||||
employeeModel.append({namens: new_employee["assignee"]});
|
||||
|
||||
console.log(employeeModel.get(num_employees).namens)
|
||||
|
||||
console.log(new_employee["assignee"])
|
||||
console.log(JSON.stringify(new_employee))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -164,10 +164,8 @@ GridLayout
|
||||
{
|
||||
id: infoview
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 200
|
||||
//Layout.columnSpan: 3
|
||||
Layout.preferredHeight: 110
|
||||
ScrollBar.horizontal: ScrollBar
|
||||
|
||||
{
|
||||
policy: ScrollBar.AlwaysOn
|
||||
}
|
||||
@@ -176,9 +174,7 @@ GridLayout
|
||||
{
|
||||
id: objectInfo
|
||||
property string name: "objectinfo"
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
implicitWidth: parent.width
|
||||
wrapMode: TextEdit.Wrap
|
||||
background: Rectangle
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@ import QtCore
|
||||
ApplicationWindow
|
||||
{
|
||||
id: appWindow
|
||||
width: Screen.width * .6
|
||||
height: Screen.height * .75
|
||||
width: Screen.width * .75
|
||||
height: Screen.height * .85
|
||||
visible: true
|
||||
title: "PYQCRM"
|
||||
property string confile: ""
|
||||
@@ -57,7 +57,7 @@ ApplicationWindow
|
||||
}
|
||||
else
|
||||
{
|
||||
if (db_con) appLoader.source= "LoginScreen.qml"
|
||||
if (db_con) appLoader.source= "AddApplicant.qml"
|
||||
else appLoader.source= "NoDbConnection.qml"
|
||||
}
|
||||
}
|
||||
|
||||
5
qml.qrc
5
qml.qrc
@@ -24,5 +24,10 @@
|
||||
<file>Gui/ObjectAddOnContactPerson.qml</file>
|
||||
<file>Gui/ObjectAddOnEmployee.qml</file>
|
||||
<file>Gui/AddObjectEmployee.qml</file>
|
||||
<file>Gui/AddApplicant.qml</file>
|
||||
<file>Gui/ApplicantPersonalData.qml</file>
|
||||
<file>Gui/ApplicantContactData.qml</file>
|
||||
<file>Gui/ApplicantBankData.qml</file>
|
||||
<file>Gui/ApplicantNationality.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user