Compare commits

..

16 Commits

29 changed files with 37518 additions and 921 deletions

View File

@@ -1,14 +1,9 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import "../js/qmldict.js" as JsLib
// ScrollView
// {
// anchors.fill: parent
// ScrollBar.vertical: ScrollBar
// {
// policy: ScrollBar.AlwaysOn
// }
ColumnLayout ColumnLayout
{ {
id: colPar id: colPar
@@ -19,11 +14,15 @@ import QtQuick.Layouts
id: headline id: headline
text: qsTr("Mitarbeiter / Bewerber hinzufügen") text: qsTr("Mitarbeiter / Bewerber hinzufügen")
font.pixelSize: 35 font.pixelSize: 35
} }
ButtonGroup ButtonGroup
{ {
buttons: radio.children buttons: radio.children
onClicked:
{
checkFields()
personalData.requiredField()
}
} }
Row Row
@@ -66,62 +65,25 @@ import QtQuick.Layouts
{ {
Layout.alignment: Qt.AlignTop Layout.alignment: Qt.AlignTop
width: parent.width 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 ApplicantBankData
{ {
id: checkbankData id: bankAccount
visible: checkbankdata.checked
} }
ApplicantNationalInsurance ApplicantNationalInsurance
{ {
id: nationalInsurance
} }
ApplicantVarious ApplicantVarious
{ {
// Layout.margins: id: applicantVarious
// {
// top: 30
// }
} }
} }
} }
} }
Item
{
Layout.fillHeight: true
}
RowLayout RowLayout
{ {
Layout.fillHeight: true Layout.fillHeight: true
@@ -136,23 +98,45 @@ import QtQuick.Layouts
id: saveBtn id: saveBtn
text: qsTr("Speichern") text: qsTr("Speichern")
enabled: false enabled: false
// onClicked: onClicked:
// { {
// if (!checkAddContact.checked) var new_applicant
// { if (radio.children[0].checked)
// new_business = JsLib.addBusiness(customerView) {
// business_model.addBusiness(new_business, 0) new_applicant = JsLib.parseForm(personalData)
// business_model.addApplicant(new_business, 0)
// appLoader.source = "EmployeeTable.qml" // appLoader.source = "EmployeeTable.qml"
// } console.log(JSON.stringify (new_applicant))
// else }
// { else
// new_business = JsLib.addBusiness(customerView) {
// var new_contact = JsLib.addBusiness(addContactLayout) // 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) // 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
}
}

View File

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

View File

@@ -71,14 +71,14 @@ ColumnLayout
{ {
if (!checkAddContact.checked) if (!checkAddContact.checked)
{ {
new_business = JsLib.addBusiness(customerView) new_business = JsLib.parseForm(customerView)
business_model.addBusiness(new_business, 0) business_model.addBusiness(new_business, 0)
appLoader.source = "CustomerTable.qml" appLoader.source = "CustomerTable.qml"
} }
else else
{ {
new_business = JsLib.addBusiness(customerView) new_business = JsLib.parseForm(customerView)
var new_contact = JsLib.addBusiness(addContactFrame.contactGrid) var new_contact = JsLib.parseForm(addContactFrame.contactGrid)
contact_model.addContact(new_contact) contact_model.addContact(new_contact)
} }
} }

View File

@@ -72,14 +72,14 @@ ColumnLayout
{ {
if (!checkAddObject.checked) if (!checkAddObject.checked)
{ {
new_object = JsLib.addObject(objectView) new_object = JsLib.parseForm(objectView)
object_model.addObject(new_object, 0) object_model.addObject(new_object, 0)
appLoader.source = "ObjectTable.qml" appLoader.source = "ObjectTable.qml"
} }
else else
{ {
new_object = JsLib.addObject(objectView) new_object = JsLib.parseForm(objectView)
var new_objecto = JsLib.addObject(addObjectLayout) var new_objecto = JsLib.parseForm(addObjectLayout)
objecto_model.addObject(new_objecto) objecto_model.addObject(new_objecto)
} }
} }

View File

@@ -12,7 +12,7 @@ ApplicationWindow
anchors.margins: 10 anchors.margins: 10
Label Label
{ {
text: qsTr("Neuer Mitarbeiter") text: qsTr("Mitarbeiter zuweisen")
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
font.pixelSize: 35 font.pixelSize: 35
} }
@@ -84,6 +84,11 @@ ApplicationWindow
id: output id: output
Layout.fillWidth: true Layout.fillWidth: true
} }
Item
{
Layout.fillHeight: true
Layout.columnSpan: 2
}
} }
RowLayout RowLayout
{ {

View File

@@ -4,7 +4,25 @@ import QtQuick.Layouts
GridLayout GridLayout
{ {
id: bankAccount
columns: 2 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 Label
{ {
text: qsTr("IBAN") text: qsTr("IBAN")
@@ -12,6 +30,7 @@ GridLayout
} }
TextField TextField
{ {
property string name: "iban"
id: iban id: iban
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -19,11 +38,14 @@ GridLayout
{ {
text: qsTr("Bank") text: qsTr("Bank")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
TextField ComboBox
{ {
property string name: "bank"
id: bankname id: bankname
Layout.fillWidth: true Layout.fillWidth: true
model: ["",qsTr("Sparkasse"),qsTr("Volksbank")]
editable: true
} }
} }

View File

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

View File

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

View File

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

View File

@@ -4,49 +4,48 @@ import QtQuick.Layouts
GridLayout GridLayout
{ {
id: nationalInsurance
columns: 2 columns: 2
Label 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.fillWidth: true
Layout.alignment: Qt.AlignLeft editable: true
RadioButton model: [qsTr("Deutschland"), qsTr("Syrien")]
{
id: radioyes
text: qsTr("Ja")
checked: true
}
RadioButton
{
id: radiono
text: qsTr("Nein")
}
} }
Label Label
{ {
text: qsTr("Sozialversicherungs-Nr") text: qsTr("Sozialversicherungs-Nr")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: socialnumber property string name: "socialno"
id: socialno
Layout.fillWidth: true Layout.fillWidth: true
} }
Label Label
{ {
text: qsTr("Steuer-ID") text: qsTr("Steuer-ID")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
property string name: "taxno"
id: taxnumber id: taxnumber
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -54,53 +53,159 @@ GridLayout
Label Label
{ {
text: qsTr("Krankenkasse") text: qsTr("Krankenkasse")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
property string name: "medicalinsurance"
id: medicalinsurance id: medicalinsurance
Layout.fillWidth: true 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 CheckBox
{ {
Layout.columnSpan: 2 Layout.preferredWidth: bankAccount.longest.width
text: qsTr("Arbeitserlaubnis") property string name: "worklicense"
visible: radiono.checked 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 Label
{ {
text: qsTr("Staatsangehörigkeit") text: qsTr("Aufenthaltstitel Nr.")
visible: radiono.checked visible: residencetype.checked
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: nationality property string name: "residenceno"
visible: radiono.checked id: residenceno
visible: residencetype.checked
Layout.fillWidth: true Layout.fillWidth: true
} }
Label Label
{ {
text: qsTr("Pass gültig bis") text: qsTr("Ausgestellt von")
visible: radiono.checked visible: residencetype.checked
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: pass property string name: "residenceauthority"
visible: radiono.checked id: residenceauthority
visible: residencetype.checked
Layout.fillWidth: true Layout.fillWidth: true
} }
Label Label
{ {
text: qsTr("Aufenthaltstitel gültig bis") text: qsTr("Ausgestellt am")
visible: radiono.checked visible: residencetype.checked
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: aufenthalt property string name: "residenceissued"
visible: radiono.checked id: residenceissued
visible: residencetype.checked
Layout.fillWidth: true 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
}
} }

View File

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

View File

@@ -5,7 +5,7 @@ import QtQuick.Layouts
GridLayout GridLayout
{ {
id: personalData id: personalData
columns: 2 columns: 4
Label Label
{ {
@@ -14,12 +14,27 @@ GridLayout
} }
ComboBox ComboBox
{ {
property string name: "title"
id: title id: title
Layout.fillWidth: true Layout.fillWidth: true
editable: false editable: false
model: [qsTr("Herr"), qsTr("Frau")] Layout.columnSpan: 3
onCurrentTextChanged: briefAnrede.text = title.currentText === "Herr"? "Sehr geehrter " + model: [qsTr("Keine Angabe"), qsTr("Herr"), qsTr("Frau")]
title.currentText: "Sehr geehrte " + title.currentText 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 Label
{ {
@@ -28,11 +43,13 @@ GridLayout
} }
TextField TextField
{ {
property string name: "firstname"
id: firstname id: firstname
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: "Pflichtfeld" placeholderText: "Pflichtfeld"
placeholderTextColor: "red" placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
} }
Label Label
{ {
@@ -41,11 +58,13 @@ GridLayout
} }
TextField TextField
{ {
property string name: "lastname"
id: lastname id: lastname
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: "Pflichtfeld" placeholderText: "Pflichtfeld"
placeholderTextColor: "red" placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
} }
Label Label
{ {
@@ -54,20 +73,59 @@ GridLayout
} }
TextField TextField
{ {
property string name: "street"
id: street id: street
Layout.fillWidth: true 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 Label
{ {
text: qsTr("PLZ") text: qsTr("PLZ")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
} }
RowLayout
{
ComboBox ComboBox
{ {
property string name: "postcode"
id: postcode id: postcode
Layout.fillWidth: true 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 ComboBox
{ {
property string name: "city"
id: city id: city
Layout.fillWidth: true 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 Label
{ {
text: qsTr("Telefonnummer") text: qsTr("Telefonnummer")
@@ -90,8 +213,34 @@ GridLayout
} }
TextField TextField
{ {
property string name: "phone"
id: phonenumber id: phonenumber
Layout.fillWidth: true 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 Label
{ {
@@ -100,8 +249,16 @@ GridLayout
} }
TextField TextField
{ {
property string name: "email"
id: email id: email
Layout.fillWidth: true 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 Label
{ {
@@ -111,11 +268,29 @@ GridLayout
} }
ComboBox ComboBox
{ {
property string name: "maritalstatus"
id: maritalstatus id: maritalstatus
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 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 Label
{ {
@@ -125,45 +300,81 @@ GridLayout
} }
TextField TextField
{ {
property string name: "jobdesc"
id: jobdescription id: jobdescription
Layout.fillWidth: true Layout.fillWidth: true
visible: radio.children[1].checked visible: radio.children[1].checked
placeholderTextColor: "red"
Layout.columnSpan: 3
onTextChanged: checkFields()
} }
Label Label
{ {
text: qsTr("Arbeitsbeginn") text: qsTr("Vertragsbeginn")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked visible: radio.children[1].checked
} }
TextField TextField
{ {
id: workstart property string name: "contractstart"
id: contractstart
Layout.fillWidth: true Layout.fillWidth: true
visible: radio.children[1].checked 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 Label
{ {
text: qsTr("Bei Befristung Ende") text: qsTr("Vertragsende")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked visible: radio.children[1].checked
} }
TextField TextField
{ {
id: workend property string name: "contractend"
id: contractend
Layout.fillWidth: true Layout.fillWidth: true
visible: radio.children[1].checked 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 Label
{ {
text: qsTr("Arbeitszeiten") text: qsTr("Arbeitszeiten Tage")
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked visible: radio.children[1].checked
} }
TextField ComboBox
{ {
id: timetowork property string name: "workdays"
id: workdays
Layout.fillWidth: true Layout.fillWidth: true
visible: radio.children[1].checked 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 Label
{ {
@@ -172,14 +383,46 @@ GridLayout
} }
TextField TextField
{ {
property string name: "formofaddress"
id: briefAnrede id: briefAnrede
Layout.fillWidth: true Layout.fillWidth: true
placeholderTextColor: "red"
Layout.columnSpan: 3
onTextChanged: checkFields()
} }
Item Item
{ {
Layout.fillHeight: true 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
} }
} }

View File

@@ -4,26 +4,32 @@ import QtQuick.Layouts
GridLayout GridLayout
{ {
id: applicantVarious
columns: 2 columns: 2
Label Label
{ {
Layout.preferredWidth: bankAccount.longest.width
text: qsTr("Grad der Behinderung") text: qsTr("Grad der Behinderung")
horizontalAlignment: Text.AlignRight
} }
TextField TextField
{ {
id: behinderung property string name: "disability"
id: disability
placeholderText: "0,0" placeholderText: "0,0"
Layout.fillWidth: true
} }
Label Label
{ {
text: qsTr("Disponent") text: qsTr("Disponent")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
property string name: "disponent"
id: disponent id: disponent
Layout.fillWidth: true Layout.fillWidth: true
} }
@@ -31,22 +37,26 @@ GridLayout
Label Label
{ {
text: qsTr("Kostenstelle") text: qsTr("Kostenstelle")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: kostenstelle property string name: "office"
id: office
Layout.fillWidth: true Layout.fillWidth: true
} }
Label Label
{ {
text: qsTr("Fremdlohn-Nr.") text: qsTr("Fremdlohn-Nr.")
Layout.alignment: Qt.AlignRight
} }
TextField TextField
{ {
id: fremdLohnNummer property string name: "empreference"
id: empreference
Layout.fillWidth: true Layout.fillWidth: true
} }
} }

View File

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

View File

@@ -31,8 +31,8 @@ GridLayout
text: qsTr("Mitarbeiter") text: qsTr("Mitarbeiter")
width: 175 width: 175
font.bold: true font.bold: true
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignLeft
color: "yellow" color: "black"
} }
} }
} }
@@ -58,11 +58,10 @@ GridLayout
{ {
width: 200 width: 200
height: 15 height: 15
padding: 7 //padding: 7
Text Text
{ {
text: model.namens text: model.namens
color: "yellow"
} }
} }
@@ -118,10 +117,6 @@ GridLayout
employeeModel.append({namens: new_employee["assignee"]}); employeeModel.append({namens: new_employee["assignee"]});
console.log(employeeModel.get(num_employees).namens)
console.log(new_employee["assignee"])
console.log(JSON.stringify(new_employee))
} }
} }

View File

@@ -112,7 +112,7 @@ Item
Text Text
{ {
text: model.display == null? "": model.display text: model.display === null? "": model.display
elide: Text.ElideRight elide: Text.ElideRight
width: parent.width width: parent.width
height: parent.height height: parent.height

View File

@@ -21,12 +21,23 @@ RowLayout
id: dashBoard id: dashBoard
flat: true flat: true
text: qsTr("Dashboard") 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: onClicked:
{ {
appLoader.source = "Dashboard.qml" appLoader.source = "Dashboard.qml"
} }
} }
Button Button
@@ -34,7 +45,19 @@ RowLayout
id: kunden id: kunden
flat: true flat: true
text: qsTr("Kunden") 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: onClicked:
{ {
// TODO: here we should call the model // TODO: here we should call the model
@@ -47,7 +70,19 @@ RowLayout
id: objekt id: objekt
flat: true flat: true
text: qsTr("Objekt") 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: onClicked:
{ {
appLoader.source = "ObjectTable.qml" appLoader.source = "ObjectTable.qml"
@@ -60,7 +95,19 @@ RowLayout
id: mitarbeiter id: mitarbeiter
flat: true flat: true
text: qsTr("Mitarbeiter") 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: onClicked:
{ {
appLoader.source = "EmployeeTable.qml" appLoader.source = "EmployeeTable.qml"
@@ -73,6 +120,18 @@ RowLayout
flat: true flat: true
text: qsTr("Abrechnung") text: qsTr("Abrechnung")
implicitWidth: abrechnung.implicitContentWidth + 10 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 Item
@@ -88,8 +147,6 @@ RowLayout
icon.color: "red" icon.color: "red"
flat: true flat: true
Layout.rightMargin: 9 Layout.rightMargin: 9
} }
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
doc/pyqcrm_er_diagram.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

View File

@@ -3,7 +3,6 @@
function firstConf(tabs) function firstConf(tabs)
{ {
let pyqcrm_conf = {}; let pyqcrm_conf = {};
pyqcrm_conf[tabs.name] = {} pyqcrm_conf[tabs.name] = {}
for (var i = 0; i < tabs.children.length; i++) 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 pyqcrm_conf[tabs.name] [tabs.children[i].name] = tabs.children[i].text
} }
} }
return pyqcrm_conf return pyqcrm_conf
} }
function addBusiness(form)
function parseForm(...form)
{ {
let business_form = {}; let data_form = {};
for (var i = 0; i < form.children.length; i++) 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 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
}

View File

@@ -8,13 +8,17 @@ class AddressDAO:
def __init__(self): def __init__(self):
#print(f"*** File: {__file__}, init()") #print(f"*** File: {__file__}, init()")
self.__con = DbManager().getConnection() self.__con = DbManager().getConnection()
if self.__con: if self.__con:
self.__cur = self.__con.cursor() self.__cur = self.__con.cursor()
def __importPlz(self): def __importPlz(self):
with open("import json filepath here", "r") as plz: with open("pfad zur datei", "r") as plz:
postcodes = json.load(plz) postcodes = json.load(plz)
irgendwas = ""
try: try:
for i in postcodes: for i in postcodes:
test =i["plz_name"].split(",") test =i["plz_name"].split(",")
@@ -24,13 +28,44 @@ class AddressDAO:
town = town.strip() town = town.strip()
if town: if town:
print(f"PROCESSING {i['name']} {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: except mariadb.OperationalError as e:
print(f"Database Error: {e}") print(f"Database Error: {e}")
finally: finally:
self.__con.commit() self.__con.commit()
print("FINISHED")# 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): def getAddressData(self, all = True, zipcode = None):
try: try:
if self.__cur: if self.__cur:

6
lib/DB/EmployeeDAO.py Normal file
View 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
View File

@@ -0,0 +1,6 @@
# This Python file uses the following encoding: utf-8
class EmployeeModel:
def __init__(self):
pass

View File

@@ -15,6 +15,8 @@ from lib.DB.BTypeModel import BTypeModel
from lib.DB.ContactModel import ContactModel from lib.DB.ContactModel import ContactModel
# [pyqcrm] # [pyqcrm]
# program-name="" # program-name=""
# version= # version=

View File

@@ -18,6 +18,8 @@
"lib/DB/BTypeModel.py", "lib/DB/BTypeModel.py",
"lib/DB/BTypeDAO.py", "lib/DB/BTypeDAO.py",
"lib/DB/ContactDAO.py", "lib/DB/ContactDAO.py",
"lib/DB/ContactModel.py" "lib/DB/ContactModel.py",
"lib/DB/EmployeeModel.py",
"lib/DB/EmployeeDAO.py"
] ]
} }

View File

@@ -26,13 +26,9 @@
<file>Gui/AddObjectEmployee.qml</file> <file>Gui/AddObjectEmployee.qml</file>
<file>Gui/AddApplicant.qml</file> <file>Gui/AddApplicant.qml</file>
<file>Gui/ApplicantPersonalData.qml</file> <file>Gui/ApplicantPersonalData.qml</file>
<file>Gui/ApplicantContactData.qml</file>
<file>Gui/ApplicantBankData.qml</file> <file>Gui/ApplicantBankData.qml</file>
<file>Gui/ApplicantNationality.qml</file>
<file>Gui/ApplicantNationalInsurance.qml</file> <file>Gui/ApplicantNationalInsurance.qml</file>
<file>Gui/ApplicantMiniJob.qml</file>
<file>Gui/ApplicantVarious.qml</file> <file>Gui/ApplicantVarious.qml</file>
<file>Gui/ApplicantBirthData.qml</file>
<file>Gui/CustomersTable.qml</file> <file>Gui/CustomersTable.qml</file>
<file>Gui/CustomerDetails.qml</file> <file>Gui/CustomerDetails.qml</file>
<file>Gui/ObjectsTable.qml</file> <file>Gui/ObjectsTable.qml</file>