Compare commits
16 Commits
afad232068
...
bcc616d3b5
| Author | SHA256 | Date | |
|---|---|---|---|
| bcc616d3b5 | |||
| 0923365cbd | |||
| 74b00c0b94 | |||
| 716915f333 | |||
| 538399b59a | |||
| 8e9fe46b96 | |||
| ba08715c9a | |||
| 104aba8347 | |||
| 338733a0fb | |||
| d512d1d8b0 | |||
| 00e535bb13 | |||
| 103b172a60 | |||
| c2edfab9a2 | |||
| 180f8e5ae9 | |||
| dab3df3b14 | |||
| 75dc64b4f3 |
@@ -1,14 +1,9 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "../js/qmldict.js" as JsLib
|
||||
|
||||
|
||||
// ScrollView
|
||||
// {
|
||||
// anchors.fill: parent
|
||||
// ScrollBar.vertical: ScrollBar
|
||||
// {
|
||||
// policy: ScrollBar.AlwaysOn
|
||||
// }
|
||||
ColumnLayout
|
||||
{
|
||||
id: colPar
|
||||
@@ -19,11 +14,15 @@ import QtQuick.Layouts
|
||||
id: headline
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
font.pixelSize: 35
|
||||
|
||||
}
|
||||
ButtonGroup
|
||||
{
|
||||
buttons: radio.children
|
||||
onClicked:
|
||||
{
|
||||
checkFields()
|
||||
personalData.requiredField()
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
@@ -66,62 +65,25 @@ import QtQuick.Layouts
|
||||
{
|
||||
Layout.alignment: Qt.AlignTop
|
||||
width: parent.width
|
||||
// CheckBox
|
||||
// {
|
||||
// id: checkcontactdata
|
||||
// Layout.fillWidth: true
|
||||
// text: qsTr("Kontaktdaten")
|
||||
// checked: false
|
||||
// }
|
||||
|
||||
// ApplicantContactData
|
||||
// {
|
||||
// visible: checkcontactdata.checked
|
||||
// }
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: miniJobber
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Minijob")
|
||||
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
|
||||
{
|
||||
// Layout.margins:
|
||||
// {
|
||||
// top: 30
|
||||
// }
|
||||
id: applicantVarious
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
@@ -136,23 +98,45 @@ import QtQuick.Layouts
|
||||
id: saveBtn
|
||||
text: qsTr("Speichern")
|
||||
enabled: false
|
||||
// onClicked:
|
||||
// {
|
||||
// if (!checkAddContact.checked)
|
||||
// {
|
||||
// new_business = JsLib.addBusiness(customerView)
|
||||
// business_model.addBusiness(new_business, 0)
|
||||
onClicked:
|
||||
{
|
||||
var new_applicant
|
||||
if (radio.children[0].checked)
|
||||
{
|
||||
new_applicant = JsLib.parseForm(personalData)
|
||||
// business_model.addApplicant(new_business, 0)
|
||||
// appLoader.source = "EmployeeTable.qml"
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// new_business = JsLib.addBusiness(customerView)
|
||||
// var new_contact = JsLib.addBusiness(addContactLayout)
|
||||
console.log(JSON.stringify (new_applicant))
|
||||
}
|
||||
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))
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
function checkFields()
|
||||
{
|
||||
if(radio.children[1].checked)
|
||||
{
|
||||
if(!personalData.checkPersonalField())
|
||||
saveBtn.enabled = false
|
||||
else
|
||||
saveBtn.enabled = true
|
||||
}
|
||||
else if (!personalData.checkPersonalField())
|
||||
saveBtn.enabled = false
|
||||
else
|
||||
saveBtn.enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Frame
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Handy")
|
||||
text: qsTr("Mobil")
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
}
|
||||
TextField
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ ApplicationWindow
|
||||
anchors.margins: 10
|
||||
Label
|
||||
{
|
||||
text: qsTr("Neuer Mitarbeiter")
|
||||
text: qsTr("Mitarbeiter zuweisen")
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
font.pixelSize: 35
|
||||
}
|
||||
@@ -84,6 +84,11 @@ ApplicationWindow
|
||||
id: output
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
Layout.columnSpan: 2
|
||||
}
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
|
||||
@@ -4,7 +4,25 @@ import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: bankAccount
|
||||
columns: 2
|
||||
property alias jobstatus: title
|
||||
property alias longest: longest
|
||||
Label
|
||||
{
|
||||
id: longest
|
||||
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")
|
||||
@@ -12,6 +30,7 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "iban"
|
||||
id: iban
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -19,11 +38,14 @@ GridLayout
|
||||
{
|
||||
text: qsTr("Bank")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
}
|
||||
TextField
|
||||
ComboBox
|
||||
{
|
||||
property string name: "bank"
|
||||
id: bankname
|
||||
Layout.fillWidth: true
|
||||
model: ["",qsTr("Sparkasse"),qsTr("Volksbank")]
|
||||
editable: true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
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")]
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
columns: 2
|
||||
Label
|
||||
{
|
||||
text: qsTr("Knappschaft")
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
id: knappschaft
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,49 +4,48 @@ import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: nationalInsurance
|
||||
columns: 2
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit Deutsch")
|
||||
Layout.preferredWidth: bankAccount.longest.width
|
||||
text: qsTr("Herkunftsland")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
Row
|
||||
ComboBox
|
||||
{
|
||||
property string name: "country"
|
||||
id: nation
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
RadioButton
|
||||
{
|
||||
id: radioyes
|
||||
text: qsTr("Ja")
|
||||
checked: true
|
||||
}
|
||||
|
||||
RadioButton
|
||||
{
|
||||
id: radiono
|
||||
text: qsTr("Nein")
|
||||
}
|
||||
editable: true
|
||||
model: [qsTr("Deutschland"), qsTr("Syrien")]
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Sozialversicherungs-Nr")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
id: socialnumber
|
||||
property string name: "socialno"
|
||||
id: socialno
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Steuer-ID")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "taxno"
|
||||
id: taxnumber
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -54,53 +53,159 @@ GridLayout
|
||||
Label
|
||||
{
|
||||
text: qsTr("Krankenkasse")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "medicalinsurance"
|
||||
id: medicalinsurance
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Knappschaft")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: bankAccount.jobstatus.currentText === "Minijob" ? 1:0
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "knappschaft"
|
||||
id: knappschaft
|
||||
Layout.fillWidth: true
|
||||
visible: bankAccount.jobstatus.currentText === "Minijob" ? 1:0
|
||||
}
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausweistyp")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
ComboBox
|
||||
{
|
||||
property string name: "idtype"
|
||||
id: idtype
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
model: [qsTr("Personalausweis"), qsTr("Reisepass")]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausweis Nr.")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "idnumber"
|
||||
id: idnumber
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausweis gültig bis")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "idexpiry"
|
||||
id: idexpiry
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ausstellungsort")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "idauthority"
|
||||
id: idauthority
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: test
|
||||
text: qsTr("Ausgestellt am")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "idissued"
|
||||
id: idissued
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
Layout.columnSpan: 2
|
||||
text: qsTr("Arbeitserlaubnis")
|
||||
visible: radiono.checked
|
||||
Layout.preferredWidth: bankAccount.longest.width
|
||||
property string name: "worklicense"
|
||||
id: worklicense
|
||||
text: qsTr("Arbeitserlaubnis <font color='red'><b>?</b></font>")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
property string name: "residencetype"
|
||||
id: residencetype
|
||||
text: qsTr("Aufenthaltstitel")
|
||||
visible: nation.currentText === "Deutschland"? false:true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Staatsangehörigkeit")
|
||||
visible: radiono.checked
|
||||
text: qsTr("Aufenthaltstitel Nr.")
|
||||
visible: residencetype.checked
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: nationality
|
||||
visible: radiono.checked
|
||||
property string name: "residenceno"
|
||||
id: residenceno
|
||||
visible: residencetype.checked
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Pass gültig bis")
|
||||
visible: radiono.checked
|
||||
text: qsTr("Ausgestellt von")
|
||||
visible: residencetype.checked
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: pass
|
||||
visible: radiono.checked
|
||||
property string name: "residenceauthority"
|
||||
id: residenceauthority
|
||||
visible: residencetype.checked
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Aufenthaltstitel gültig bis")
|
||||
visible: radiono.checked
|
||||
text: qsTr("Ausgestellt am")
|
||||
visible: residencetype.checked
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: aufenthalt
|
||||
visible: radiono.checked
|
||||
property string name: "residenceissued"
|
||||
id: residenceissued
|
||||
visible: residencetype.checked
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Gültig bis")
|
||||
visible: residencetype.checked
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "residenceexpiry"
|
||||
id: residenceexpiry
|
||||
visible: residencetype.checked
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import QtQuick.Layouts
|
||||
GridLayout
|
||||
{
|
||||
id: personalData
|
||||
columns: 2
|
||||
columns: 4
|
||||
|
||||
Label
|
||||
{
|
||||
@@ -14,12 +14,27 @@ GridLayout
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "title"
|
||||
id: title
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: [qsTr("Herr"), qsTr("Frau")]
|
||||
onCurrentTextChanged: briefAnrede.text = title.currentText === "Herr"? "Sehr geehrter " +
|
||||
title.currentText: "Sehr geehrte " + title.currentText
|
||||
Layout.columnSpan: 3
|
||||
model: [qsTr("Keine Angabe"), qsTr("Herr"), qsTr("Frau")]
|
||||
onCurrentTextChanged:
|
||||
{
|
||||
switch (title.currentIndex)
|
||||
{
|
||||
case 1:
|
||||
briefAnrede.text = "Sehr geehrter Herr "
|
||||
break
|
||||
case 2:
|
||||
briefAnrede.text = "Sehr geehrte Frau "
|
||||
break
|
||||
default:
|
||||
briefAnrede.text = "Guten Tag "
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -28,11 +43,13 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "firstname"
|
||||
id: firstname
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -41,11 +58,13 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "lastname"
|
||||
id: lastname
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -54,20 +73,59 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "street"
|
||||
id: street
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Nr.")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "houseno"
|
||||
id: houseno
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([0-9a-zA-Z\-]{1,6})/
|
||||
}
|
||||
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("PLZ")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
ComboBox
|
||||
{
|
||||
property string name: "postcode"
|
||||
id: postcode
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
onEditTextChanged: checkFields()
|
||||
onCurrentTextChanged: 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,4})/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +137,75 @@ GridLayout
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "city"
|
||||
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
|
||||
{
|
||||
text: qsTr("Geburtsname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthname"
|
||||
id: birthname
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Geburtsdatum")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthday"
|
||||
id: birthday
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
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")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "placeofbirth"
|
||||
id: placeofbirth
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Pflichtfeld"
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Telefonnummer")
|
||||
@@ -90,8 +213,34 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "phone"
|
||||
id: phonenumber
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Mobil")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "mobile"
|
||||
id: cellphone
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -100,8 +249,16 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "email"
|
||||
id: email
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([\+!#$%&‘\*\–\/\=?\^_`\.{|}\~0-9A-Za-z]{1,185})@([0-9A-Za-z\.]{1,64})\.([a-zA-z]{2,5})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -111,11 +268,29 @@ GridLayout
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "maritalstatus"
|
||||
id: maritalstatus
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: [qsTr("ledig"), qsTr("verheiratet"), qsTr("verwitwet"), qsTr("geschieden")]
|
||||
visible: radio.children[1].checked
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Stundenlohn")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "salary"
|
||||
id: salary
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -125,45 +300,81 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "jobdesc"
|
||||
id: jobdescription
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Arbeitsbeginn")
|
||||
text: qsTr("Vertragsbeginn")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: workstart
|
||||
property string name: "contractstart"
|
||||
id: contractstart
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
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("Bei Befristung Ende")
|
||||
text: qsTr("Vertragsende")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
id: workend
|
||||
property string name: "contractend"
|
||||
id: contractend
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
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("Arbeitszeiten")
|
||||
text: qsTr("Arbeitszeiten Tage")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
ComboBox
|
||||
{
|
||||
id: timetowork
|
||||
property string name: "workdays"
|
||||
id: workdays
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
model: ["1","2","3","4","5","6","7"]
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Stunden")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "workhours"
|
||||
id: workhours
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
model: ["1","2","3","4","5","6","7","8"]
|
||||
}
|
||||
Label
|
||||
{
|
||||
@@ -172,14 +383,46 @@ GridLayout
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "formofaddress"
|
||||
id: briefAnrede
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
Layout.columnSpan: 2
|
||||
Layout.columnSpan: 4
|
||||
}
|
||||
function checkPersonalField()
|
||||
{
|
||||
if (radio.children[0].checked)
|
||||
{
|
||||
return (firstname.text.trim() && lastname.text.trim())
|
||||
}
|
||||
else
|
||||
{
|
||||
return (firstname.text.trim() && lastname.text.trim() && street.text.trim() && houseno.text.trim()
|
||||
&& (postcode.editText.trim() || postcode.currentText.trim())
|
||||
&& (city.editText.trim() || city.currentText.trim())
|
||||
&& birthday.text.trim() && phonenumber.text.trim()
|
||||
&& cellphone.text.trim() && email.text.trim() && jobdescription.text.trim()
|
||||
&& contractstart.text.trim() && contractend.text.trim() && briefAnrede.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
|
||||
contractstart.placeholderText = pf
|
||||
contractend.placeholderText = pf
|
||||
briefAnrede.placeholderText = pf
|
||||
houseno.placeholderText = pf
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,26 +4,32 @@ import QtQuick.Layouts
|
||||
|
||||
GridLayout
|
||||
{
|
||||
id: applicantVarious
|
||||
columns: 2
|
||||
|
||||
Label
|
||||
{
|
||||
Layout.preferredWidth: bankAccount.longest.width
|
||||
text: qsTr("Grad der Behinderung")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
id: behinderung
|
||||
property string name: "disability"
|
||||
id: disability
|
||||
placeholderText: "0,0"
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Disponent")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
property string name: "disponent"
|
||||
id: disponent
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
@@ -31,22 +37,26 @@ GridLayout
|
||||
Label
|
||||
{
|
||||
text: qsTr("Kostenstelle")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
id: kostenstelle
|
||||
property string name: "office"
|
||||
id: office
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Fremdlohn-Nr.")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
TextField
|
||||
{
|
||||
id: fremdLohnNummer
|
||||
property string name: "empreference"
|
||||
id: empreference
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ GridLayout
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Handy")
|
||||
text: qsTr("Mobil")
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
}
|
||||
TextField
|
||||
|
||||
@@ -31,8 +31,8 @@ GridLayout
|
||||
text: qsTr("Mitarbeiter")
|
||||
width: 175
|
||||
font.bold: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: "yellow"
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
color: "black"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,11 +58,10 @@ GridLayout
|
||||
{
|
||||
width: 200
|
||||
height: 15
|
||||
padding: 7
|
||||
//padding: 7
|
||||
Text
|
||||
{
|
||||
text: model.namens
|
||||
color: "yellow"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,10 +117,6 @@ GridLayout
|
||||
|
||||
employeeModel.append({namens: new_employee["assignee"]});
|
||||
|
||||
console.log(employeeModel.get(num_employees).namens)
|
||||
|
||||
console.log(new_employee["assignee"])
|
||||
console.log(JSON.stringify(new_employee))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ Item
|
||||
|
||||
Text
|
||||
{
|
||||
text: model.display == null? "": model.display
|
||||
text: model.display === null? "": model.display
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
@@ -21,12 +21,23 @@ RowLayout
|
||||
id: dashBoard
|
||||
flat: true
|
||||
text: qsTr("Dashboard")
|
||||
implicitWidth: dashBoard.implicitContentWidth + 10
|
||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
||||
Layout.margins: 3
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: dashBoard.activeFocus ? 2 : 1
|
||||
border.color: "#888"
|
||||
radius: 4
|
||||
gradient: Gradient
|
||||
{
|
||||
GradientStop { position: 0 ; color: dashBoard.pressed ? "#000" : "#001" }
|
||||
GradientStop { position: 1 ; color: dashBoard.pressed ? "#100" : "#000" }
|
||||
}
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
appLoader.source = "Dashboard.qml"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button
|
||||
@@ -34,7 +45,19 @@ RowLayout
|
||||
id: kunden
|
||||
flat: true
|
||||
text: qsTr("Kunden")
|
||||
implicitWidth: kunden.implicitContentWidth + 10
|
||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
||||
Layout.margins: 3
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: kunden.activeFocus ? 2 : 1
|
||||
border.color: "#888"
|
||||
radius: 4
|
||||
gradient: Gradient
|
||||
{
|
||||
GradientStop { position: 0 ; color: kunden.pressed ? "#000" : "#001" }
|
||||
GradientStop { position: 1 ; color: kunden.pressed ? "#100" : "#000" }
|
||||
}
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
// TODO: here we should call the model
|
||||
@@ -47,7 +70,19 @@ RowLayout
|
||||
id: objekt
|
||||
flat: true
|
||||
text: qsTr("Objekt")
|
||||
implicitWidth: objekt.implicitContentWidth + 10
|
||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
||||
Layout.margins: 3
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: objekt.activeFocus ? 2 : 1
|
||||
border.color: "#888"
|
||||
radius: 4
|
||||
gradient: Gradient
|
||||
{
|
||||
GradientStop { position: 0 ; color: objekt.pressed ? "#000" : "#001" }
|
||||
GradientStop { position: 1 ; color: objekt.pressed ? "#100" : "#000" }
|
||||
}
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
appLoader.source = "ObjectTable.qml"
|
||||
@@ -60,7 +95,19 @@ RowLayout
|
||||
id: mitarbeiter
|
||||
flat: true
|
||||
text: qsTr("Mitarbeiter")
|
||||
implicitWidth: mitarbeiter.implicitContentWidth + 10
|
||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
||||
Layout.margins: 3
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: mitarbeiter.activeFocus ? 2 : 1
|
||||
border.color: "#888"
|
||||
radius: 4
|
||||
gradient: Gradient
|
||||
{
|
||||
GradientStop { position: 0 ; color: mitarbeiter.pressed ? "#000" : "#001" }
|
||||
GradientStop { position: 1 ; color: mitarbeiter.pressed ? "#100" : "#000" }
|
||||
}
|
||||
}
|
||||
onClicked:
|
||||
{
|
||||
appLoader.source = "EmployeeTable.qml"
|
||||
@@ -73,6 +120,18 @@ RowLayout
|
||||
flat: true
|
||||
text: qsTr("Abrechnung")
|
||||
implicitWidth: abrechnung.implicitContentWidth + 10
|
||||
Layout.margins: 3
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: abrechnung.activeFocus ? 2 : 1
|
||||
border.color: "#888"
|
||||
radius: 4
|
||||
gradient: Gradient
|
||||
{
|
||||
GradientStop { position: 0 ; color: abrechnung.pressed ? "#000" : "#001" }
|
||||
GradientStop { position: 1 ; color: abrechnung.pressed ? "#100" : "#000" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
@@ -88,8 +147,6 @@ RowLayout
|
||||
icon.color: "red"
|
||||
flat: true
|
||||
Layout.rightMargin: 9
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1160
doc/datenbank.drawio
1160
doc/datenbank.drawio
File diff suppressed because it is too large
Load Diff
1594
doc/db_schemer_v1.1-pyqcrm-202501210906.sql
Normal file
1594
doc/db_schemer_v1.1-pyqcrm-202501210906.sql
Normal file
File diff suppressed because it is too large
Load Diff
17097
doc/db_schemer_v1.1-pyqcrm-202501220855.sql
Normal file
17097
doc/db_schemer_v1.1-pyqcrm-202501220855.sql
Normal file
File diff suppressed because it is too large
Load Diff
17410
doc/db_schemer_v1.1-pyqcrm-202501231021.sql
Normal file
17410
doc/db_schemer_v1.1-pyqcrm-202501231021.sql
Normal file
File diff suppressed because it is too large
Load Diff
BIN
doc/pyqcrm_er_diagram.png
Normal file
BIN
doc/pyqcrm_er_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 325 KiB |
@@ -3,7 +3,6 @@
|
||||
function firstConf(tabs)
|
||||
{
|
||||
let pyqcrm_conf = {};
|
||||
|
||||
pyqcrm_conf[tabs.name] = {}
|
||||
for (var i = 0; i < tabs.children.length; i++)
|
||||
{
|
||||
@@ -17,65 +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
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,13 +8,17 @@ class AddressDAO:
|
||||
def __init__(self):
|
||||
#print(f"*** File: {__file__}, init()")
|
||||
self.__con = DbManager().getConnection()
|
||||
|
||||
if self.__con:
|
||||
self.__cur = self.__con.cursor()
|
||||
|
||||
|
||||
|
||||
|
||||
def __importPlz(self):
|
||||
with open("import json filepath here", "r") as plz:
|
||||
with open("pfad zur datei", "r") as plz:
|
||||
postcodes = json.load(plz)
|
||||
irgendwas = ""
|
||||
try:
|
||||
for i in postcodes:
|
||||
test =i["plz_name"].split(",")
|
||||
@@ -24,13 +28,44 @@ class AddressDAO:
|
||||
town = town.strip()
|
||||
if town:
|
||||
print(f"PROCESSING {i['name']} {town}")
|
||||
self.__cur.callproc("addZipCodes", (i["name"], town,))
|
||||
self.__cur.callproc("addZipCodes", (i["name"], town, irgendwas,))
|
||||
#self.__cur.callproc("addZipCodes", ("56271", "Kleinmaischeid", irgendwas,))
|
||||
except mariadb.OperationalError as e:
|
||||
print(f"Database Error: {e}")
|
||||
finally:
|
||||
self.__con.commit()
|
||||
print("FINISHED")#
|
||||
|
||||
def __importCountry(self):
|
||||
with open("pfad zur datei", "r") as country:
|
||||
countries = json.load(country)
|
||||
old = ""
|
||||
try:
|
||||
for i in countries["daten"]:
|
||||
if i[4] == "–":
|
||||
continue
|
||||
elif i[8] == "YU":
|
||||
continue
|
||||
elif i[4] == old:
|
||||
continue
|
||||
elif i[4] == "Serbien und Montenegro":
|
||||
continue
|
||||
elif i[4] == "Bosnien und Herzegowina":
|
||||
continue
|
||||
|
||||
print(i[4], i[3], i[2], i[8], i[7])
|
||||
|
||||
self.__cur.execute("INSERT INTO country (country, countryshort, nationality, iso2, iso3) VALUES (%s, %s, %s, %s, %s)", (i[4], i[3], i[2], i[8], i[7]))
|
||||
old = i[4]
|
||||
except mariadb.OperationalError as e:
|
||||
print(f"Database Error: {e}")
|
||||
finally:
|
||||
self.__con.commit()
|
||||
print("FINISHED")#
|
||||
|
||||
|
||||
|
||||
|
||||
def getAddressData(self, all = True, zipcode = None):
|
||||
try:
|
||||
if self.__cur:
|
||||
|
||||
6
lib/DB/EmployeeDAO.py
Normal file
6
lib/DB/EmployeeDAO.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# This Python file uses the following encoding: utf-8
|
||||
|
||||
|
||||
class EmployeeDAO:
|
||||
def __init__(self):
|
||||
pass
|
||||
6
lib/DB/EmployeeModel.py
Normal file
6
lib/DB/EmployeeModel.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# This Python file uses the following encoding: utf-8
|
||||
|
||||
|
||||
class EmployeeModel:
|
||||
def __init__(self):
|
||||
pass
|
||||
2
main.py
2
main.py
@@ -15,6 +15,8 @@ from lib.DB.BTypeModel import BTypeModel
|
||||
from lib.DB.ContactModel import ContactModel
|
||||
|
||||
|
||||
|
||||
|
||||
# [pyqcrm]
|
||||
# program-name=""
|
||||
# version=
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
"lib/DB/BTypeModel.py",
|
||||
"lib/DB/BTypeDAO.py",
|
||||
"lib/DB/ContactDAO.py",
|
||||
"lib/DB/ContactModel.py"
|
||||
"lib/DB/ContactModel.py",
|
||||
"lib/DB/EmployeeModel.py",
|
||||
"lib/DB/EmployeeDAO.py"
|
||||
]
|
||||
}
|
||||
|
||||
4
qml.qrc
4
qml.qrc
@@ -26,13 +26,9 @@
|
||||
<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>
|
||||
<file>Gui/ApplicantNationalInsurance.qml</file>
|
||||
<file>Gui/ApplicantMiniJob.qml</file>
|
||||
<file>Gui/ApplicantVarious.qml</file>
|
||||
<file>Gui/ApplicantBirthData.qml</file>
|
||||
<file>Gui/CustomersTable.qml</file>
|
||||
<file>Gui/CustomerDetails.qml</file>
|
||||
<file>Gui/ObjectsTable.qml</file>
|
||||
|
||||
Reference in New Issue
Block a user