Merge branch 'main' into schnacke
This commit is contained in:
@@ -1,180 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "../js/qmldict.js" as JsLib
|
||||
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
id: colPar
|
||||
anchors.fill: parent
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
implicitWidth: parent.width
|
||||
Label
|
||||
{
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
id: headline
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
font.pixelSize: 35
|
||||
}
|
||||
ButtonGroup
|
||||
{
|
||||
buttons: radio.children
|
||||
onClicked:
|
||||
{
|
||||
checkFields()
|
||||
personalData.requiredField()
|
||||
}
|
||||
}
|
||||
|
||||
Row
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
id: radio
|
||||
//Layout.columnSpan: 2
|
||||
RadioButton
|
||||
{
|
||||
checked: true
|
||||
text: qsTr("Bewerber")
|
||||
}
|
||||
RadioButton
|
||||
{
|
||||
text: qsTr("Mitarbeiter")
|
||||
}
|
||||
}
|
||||
|
||||
// ScrollView
|
||||
// {
|
||||
// Layout.fillHeight: true
|
||||
// Layout.fillWidth: true
|
||||
// implicitWidth: parent.width
|
||||
|
||||
// ColumnLayout
|
||||
// {
|
||||
// anchors.fill: parent
|
||||
// //implicitWidth: parent.width
|
||||
// //width: parent.width
|
||||
// //height: parent.height
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
//implicitWidth: parent.width
|
||||
spacing: 50
|
||||
|
||||
Frame
|
||||
{
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
//implicitWidth: parent.width
|
||||
ApplicantPersonalData
|
||||
{
|
||||
id: personalData
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
|
||||
Frame
|
||||
{
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
ColumnLayout
|
||||
{
|
||||
Layout.alignment: Qt.AlignTop
|
||||
implicitWidth: parent.width
|
||||
|
||||
ApplicantBankData
|
||||
{
|
||||
id: bankAccount
|
||||
}
|
||||
|
||||
ApplicantNationalInsurance
|
||||
{
|
||||
id: nationalInsurance
|
||||
}
|
||||
|
||||
ApplicantVarious
|
||||
{
|
||||
id: applicantVarious
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Button
|
||||
{
|
||||
text: qsTr("Abbrechen")
|
||||
onClicked: appLoader.source = "EmployeeTable.qml"
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: saveBtn
|
||||
text: qsTr("Speichern")
|
||||
enabled: false
|
||||
onClicked:
|
||||
{
|
||||
var new_applicant
|
||||
if (radio.children[0].checked)
|
||||
{
|
||||
// Ein Bewerber
|
||||
new_applicant = JsLib.parseForm(personalData)
|
||||
employee_model.addEmployee(new_applicant, true)
|
||||
// appLoader.source = "EmployeeTable.qml"
|
||||
// console.log(JSON.stringify (new_applicant))
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ein Mitarbeiter
|
||||
// console.log(personalData, bankAccount, nationalInsurance, applicantVarious)
|
||||
new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious)
|
||||
employee_model.addEmployee(new_applicant, false)
|
||||
// var new_contact = JsLib.addApplicant(addContactLayout)
|
||||
// contact_model.addContact(new_contact)
|
||||
// console.log(JSON.stringify (new_applicant))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Component.onCompleted:
|
||||
{
|
||||
employee_model.addedNewEmployee.connect(onAddNewEmployee)
|
||||
}
|
||||
|
||||
// }
|
||||
// } // ScrollView
|
||||
function onAddNewEmployee(added)
|
||||
{
|
||||
if (added)
|
||||
console.log('addedsuccesfully')
|
||||
else
|
||||
console.log('failedtoadd')
|
||||
appLoader.source = 'EmployeeTable.qml'
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ ColumnLayout
|
||||
Button
|
||||
{
|
||||
text: qsTr("Abbrechen")
|
||||
onClicked: appLoader.source = "CustomerTable.qml"
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
Button
|
||||
{
|
||||
@@ -72,7 +72,7 @@ ColumnLayout
|
||||
{
|
||||
new_business = JsLib.parseForm(customerView)
|
||||
business_model.addBusiness(new_business, 0)
|
||||
appLoader.source = "CustomerTable.qml"
|
||||
contentStack.pop()
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -99,7 +99,7 @@ ColumnLayout
|
||||
{
|
||||
var con_id = arguments[0]
|
||||
business_model.addBusiness(new_business, con_id)
|
||||
appLoader.source = "CustomerTable.qml"
|
||||
contentStack.pop()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ ColumnLayout
|
||||
Button
|
||||
{
|
||||
text: qsTr("Abbrechen")
|
||||
onClicked: appLoader.source = "ObjectTable.qml"
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
Button
|
||||
{
|
||||
@@ -105,7 +105,7 @@ ColumnLayout
|
||||
object_model.viewCriterion("Alle")
|
||||
}
|
||||
|
||||
appLoader.source = "ObjectTable.qml"
|
||||
contentStack.pop()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ ColumnLayout
|
||||
Button
|
||||
{
|
||||
text: qsTr("Abbrechen")
|
||||
onClicked: appLoader.source = "OfferTable.qml"
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
Button
|
||||
{
|
||||
|
||||
@@ -12,8 +12,7 @@ ColumnLayout
|
||||
Button
|
||||
{
|
||||
text: qsTr("Zurück")
|
||||
//Layout.columnSpan: 2
|
||||
onClicked: customersStack.pop()
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
|
||||
SplitView
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||
|
||||
StackView
|
||||
{
|
||||
id: customersStack
|
||||
anchors.fill: parent
|
||||
initialItem: "CustomersTable.qml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
ColumnLayout {
|
||||
property var availableFilters: ["Name", "Adresse", "PLZ", "Ort"]
|
||||
|
||||
function viewCriterion(criterion)
|
||||
{
|
||||
@@ -15,7 +16,7 @@ ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: Dimensions.l
|
||||
|
||||
Component.onCompleted: customersStack.pop()
|
||||
Component.onCompleted: contentStack.pop()
|
||||
|
||||
RowLayout
|
||||
{
|
||||
@@ -67,7 +68,7 @@ ColumnLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
icon.source: "qrc:/images/PlusCircle.svg"
|
||||
text: qsTr("Kunde Hinzufügen")
|
||||
onClicked: appLoader.source = "AddCustomer.qml"
|
||||
onClicked: contentStack.push("AddCustomer.qml")
|
||||
}
|
||||
}
|
||||
ColumnLayout
|
||||
@@ -153,7 +154,7 @@ ColumnLayout {
|
||||
|
||||
onDoubleClicked: {
|
||||
business_model.onRowClicked(row);
|
||||
customersStack.push("CustomerDetails.qml", {
|
||||
contentStack.push("CustomerDetails.qml", {
|
||||
selectedClient: row
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
StackView {
|
||||
id: employeesStack
|
||||
|
||||
anchors.fill: parent
|
||||
initialItem: "EmployeesTable.qml"
|
||||
}
|
||||
}
|
||||
|
||||
43
Gui/Employees/AddApplicant.qml
Normal file
43
Gui/Employees/AddApplicant.qml
Normal file
@@ -0,0 +1,43 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import TeroStyle
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: Dimensions.l
|
||||
|
||||
Component.onCompleted: {
|
||||
employee_model.addedNewEmployee.connect(successful => {
|
||||
if (successful)
|
||||
contentStack.pop();
|
||||
});
|
||||
}
|
||||
|
||||
ApplicantForm {
|
||||
id: applicantForm
|
||||
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
Layout.verticalStretchFactor: 1
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
spacing: Dimensions.l
|
||||
|
||||
Button {
|
||||
icon.source: "qrc:/images/ArrowLeftCircle-Outline.svg"
|
||||
text: qsTr("Verwerfen")
|
||||
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
Button {
|
||||
enabled: applicantForm.valid
|
||||
icon.source: "qrc:/images/CheckCircle.svg"
|
||||
text: qsTr("Speichern")
|
||||
|
||||
onClicked: {
|
||||
employee_model.addApplicant(applicantForm.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
102
Gui/Employees/AddEmployee.qml
Normal file
102
Gui/Employees/AddEmployee.qml
Normal file
@@ -0,0 +1,102 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "../../js/qmldict.js" as JsLib
|
||||
|
||||
ColumnLayout {
|
||||
id: colPar
|
||||
|
||||
function checkFields() {
|
||||
if (!personalData.checkPersonalField())
|
||||
saveBtn.enabled = false;
|
||||
else
|
||||
saveBtn.enabled = true;
|
||||
}
|
||||
function onAddNewEmployee(added) {
|
||||
if (added) {
|
||||
console.log('addedsuccesfully');
|
||||
contentStack.pop();
|
||||
} else {
|
||||
console.log('failedtoadd');
|
||||
}
|
||||
}
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
anchors.fill: parent
|
||||
implicitWidth: parent.width
|
||||
|
||||
Component.onCompleted: {
|
||||
employee_model.addedNewEmployee.connect(onAddNewEmployee);
|
||||
}
|
||||
|
||||
Label {
|
||||
id: headline
|
||||
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
font.pixelSize: 35
|
||||
text: qsTr("Mitarbeiter / Bewerber hinzufügen")
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Dimensions.l
|
||||
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
ApplicantPersonalData {
|
||||
id: personalData
|
||||
|
||||
implicitWidth: parent.width
|
||||
}
|
||||
}
|
||||
Frame {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
Layout.horizontalStretchFactor: 1
|
||||
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
implicitWidth: parent.width
|
||||
|
||||
ApplicantBankData {
|
||||
id: bankAccount
|
||||
|
||||
}
|
||||
ApplicantNationalInsurance {
|
||||
id: nationalInsurance
|
||||
}
|
||||
ApplicantVarious {
|
||||
id: applicantVarious
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.fillWidth: true
|
||||
|
||||
Button {
|
||||
text: qsTr("Abbrechen")
|
||||
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
Button {
|
||||
id: saveBtn
|
||||
|
||||
enabled: false
|
||||
text: qsTr("Speichern")
|
||||
|
||||
onClicked: {
|
||||
const new_applicant = JsLib.parseForm(personalData, bankAccount, nationalInsurance, applicantVarious);
|
||||
employee_model.addEmployee(new_applicant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
221
Gui/Employees/ApplicantForm.qml
Normal file
221
Gui/Employees/ApplicantForm.qml
Normal file
@@ -0,0 +1,221 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Layouts
|
||||
import TeroStyle
|
||||
|
||||
ColumnLayout {
|
||||
readonly property int fieldM: 235
|
||||
readonly property int fieldS: 110
|
||||
readonly property bool valid: city.acceptableInput && email.acceptableInput && firstname.acceptableInput && lastname.acceptableInput && mobile.acceptableInput && phone.acceptableInput && postcode.acceptableInput && formofaddress.acceptableInput && title.acceptableInput
|
||||
readonly property var value: QtObject {
|
||||
readonly property string city: (city.editText ? city.editText : city.currentText) ?? ""
|
||||
readonly property string email: email.text
|
||||
readonly property string firstname: firstname.text
|
||||
readonly property string formofaddress: formofaddress.currentText ?? ""
|
||||
readonly property string houseno: houseno.text ?? ""
|
||||
readonly property string lastname: lastname.text
|
||||
readonly property string mobile: mobile.text
|
||||
readonly property string phone: phone.text
|
||||
readonly property string postcode: (postcode.editText ? postcode.editText : postcode.currentText) ?? ""
|
||||
readonly property string street: (street.editText ? street.editText : street.currentText) ?? ""
|
||||
readonly property string title: title.currentText
|
||||
}
|
||||
|
||||
spacing: Dimensions.l
|
||||
|
||||
IconLabel {
|
||||
color: Colors.foreground
|
||||
font: Typography.h2
|
||||
icon.color: Colors.foreground
|
||||
icon.height: Typography.h2.pixelSize
|
||||
icon.source: "qrc:/images/UserCircle"
|
||||
icon.width: Typography.h2.pixelSize
|
||||
spacing: Dimensions.m
|
||||
text: qsTr("Stammdaten")
|
||||
}
|
||||
RowLayout {
|
||||
spacing: Dimensions.m
|
||||
|
||||
Field {
|
||||
label: qsTr("Anrede")
|
||||
|
||||
ComboBox {
|
||||
id: title
|
||||
|
||||
implicitWidth: fieldM
|
||||
model: [qsTr("Keine Angabe"), qsTr("Herr"), qsTr("Frau")]
|
||||
|
||||
onCurrentTextChanged: {
|
||||
switch (title.currentIndex) {
|
||||
case 1:
|
||||
formofaddress.text = "Sehr geehrter Herr ";
|
||||
break;
|
||||
case 2:
|
||||
formofaddress.text = "Sehr geehrte Frau ";
|
||||
break;
|
||||
default:
|
||||
formofaddress.text = "Guten Tag ";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("Vorname")
|
||||
mandatory: true
|
||||
|
||||
TextField {
|
||||
id: firstname
|
||||
|
||||
implicitWidth: fieldM
|
||||
placeholderText: qsTr("Max")
|
||||
|
||||
validator: NotEmptyValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("Nachname")
|
||||
mandatory: true
|
||||
|
||||
TextField {
|
||||
id: lastname
|
||||
|
||||
implicitWidth: fieldM
|
||||
placeholderText: qsTr("Mustermann")
|
||||
|
||||
validator: NotEmptyValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
spacing: Dimensions.m
|
||||
|
||||
Field {
|
||||
id: street
|
||||
|
||||
label: qsTr("Straße")
|
||||
mandatory: true
|
||||
|
||||
TextField {
|
||||
implicitWidth: fieldM
|
||||
placeholderText: qsTr("Musterstraße")
|
||||
|
||||
validator: NotEmptyValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
id: houseno
|
||||
mandatory: true
|
||||
|
||||
label: qsTr("Hausnummer")
|
||||
|
||||
TextField {
|
||||
implicitWidth: fieldS
|
||||
placeholderText: qsTr("1a")
|
||||
|
||||
validator: NotEmptyValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("PLZ")
|
||||
mandatory: true
|
||||
|
||||
ComboBox {
|
||||
id: postcode
|
||||
|
||||
currentIndex: -1
|
||||
editable: true
|
||||
implicitWidth: fieldS
|
||||
model: address_model
|
||||
textRole: "display"
|
||||
|
||||
onActivated: currentValue
|
||||
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
|
||||
|
||||
validator: NotEmptyValidator {}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("Ort")
|
||||
mandatory: true
|
||||
|
||||
ComboBox {
|
||||
id: city
|
||||
|
||||
currentIndex: -1
|
||||
editable: true
|
||||
implicitWidth: fieldM
|
||||
model: address_model
|
||||
textRole: "city"
|
||||
|
||||
validator: NotEmptyValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
IconLabel {
|
||||
color: Colors.foreground
|
||||
font: Typography.h2
|
||||
icon.color: Colors.foreground
|
||||
icon.height: Typography.h2.pixelSize
|
||||
icon.source: "qrc:/images/Phone"
|
||||
icon.width: Typography.h2.pixelSize
|
||||
spacing: Dimensions.m
|
||||
text: qsTr("Kontakt")
|
||||
}
|
||||
RowLayout {
|
||||
spacing: Dimensions.m
|
||||
|
||||
Field {
|
||||
label: qsTr("Telefonnummer")
|
||||
|
||||
TextField {
|
||||
id: phone
|
||||
|
||||
implicitWidth: fieldM
|
||||
placeholderText: "+49 1234 567890"
|
||||
|
||||
validator: OptionalPhoneNumberValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("Mobil")
|
||||
|
||||
TextField {
|
||||
id: mobile
|
||||
|
||||
implicitWidth: fieldM
|
||||
placeholderText: "+49 123 4567891011"
|
||||
|
||||
validator: OptionalPhoneNumberValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("E-Mail Adresse")
|
||||
|
||||
TextField {
|
||||
id: email
|
||||
|
||||
implicitWidth: fieldM
|
||||
placeholderText: "tero@example.org"
|
||||
|
||||
validator: OptionalEmailAddressValidator {
|
||||
}
|
||||
}
|
||||
}
|
||||
Field {
|
||||
label: qsTr("Briefanrede")
|
||||
|
||||
TextField {
|
||||
id: formofaddress
|
||||
|
||||
implicitWidth: fieldM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,444 +1,409 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import TeroStyle
|
||||
|
||||
GridLayout
|
||||
{
|
||||
GridLayout {
|
||||
id: personalData
|
||||
columns: 4
|
||||
Label
|
||||
{
|
||||
text: qsTr("Anrede")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
function checkPersonalField() {
|
||||
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());
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "title"
|
||||
function requiredField() {
|
||||
const pf = "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;
|
||||
}
|
||||
|
||||
columns: 4
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Anrede")
|
||||
}
|
||||
ComboBox {
|
||||
id: title
|
||||
|
||||
property string name: "title"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
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 "
|
||||
|
||||
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 {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Vorname*")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "firstname"
|
||||
TextField {
|
||||
id: firstname
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Nachname*")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "lastname"
|
||||
id: lastname
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Straße")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "street"
|
||||
id: street
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
onTextChanged: checkFields()
|
||||
|
||||
property string name: "firstname"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Nr.")
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Nachname*")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "houseno"
|
||||
id: houseno
|
||||
TextField {
|
||||
id: lastname
|
||||
|
||||
property string name: "lastname"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Straße")
|
||||
}
|
||||
TextField {
|
||||
id: street
|
||||
|
||||
property string name: "street"
|
||||
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Nr.")
|
||||
}
|
||||
TextField {
|
||||
id: houseno
|
||||
|
||||
property string name: "houseno"
|
||||
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /([0-9a-zA-Z\-]{1,6})/
|
||||
}
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("PLZ")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ComboBox
|
||||
{
|
||||
property string name: "postcode"
|
||||
ComboBox {
|
||||
id: postcode
|
||||
|
||||
property string name: "postcode"
|
||||
|
||||
Layout.fillWidth: true
|
||||
currentIndex: -1
|
||||
editable: true
|
||||
onEditTextChanged: checkFields()
|
||||
onCurrentTextChanged: checkFields()
|
||||
onActivated: currentValue
|
||||
model: address_model
|
||||
popup.height: 300
|
||||
textRole: "display"
|
||||
popup.height: 300
|
||||
currentIndex: -1
|
||||
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([^$][0-9]{1,4})/
|
||||
|
||||
validator: PostcodeValidator {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: qsTr("Ort")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "city"
|
||||
id: city
|
||||
Layout.fillWidth: true
|
||||
editable: true
|
||||
onEditTextChanged: checkFields()
|
||||
onActivated: currentValue
|
||||
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
|
||||
onCurrentTextChanged: checkFields()
|
||||
model: address_model
|
||||
textRole: "city"
|
||||
popup.height: 300
|
||||
currentIndex: -1
|
||||
onEditTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Ort")
|
||||
}
|
||||
ComboBox {
|
||||
id: city
|
||||
|
||||
property string name: "city"
|
||||
|
||||
Layout.fillWidth: true
|
||||
currentIndex: -1
|
||||
editable: true
|
||||
model: address_model
|
||||
popup.height: 300
|
||||
textRole: "city"
|
||||
|
||||
onCurrentTextChanged: checkFields()
|
||||
onEditTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Geburtsname")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthname"
|
||||
TextField {
|
||||
id: birthname
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
|
||||
property string name: "birthname"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
Layout.fillWidth: true
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Geburtsdatum*")
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
text: qsTr("Geburtsdatum*")
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "birthday"
|
||||
TextField {
|
||||
id: birthday
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
|
||||
property string name: "birthday"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
|
||||
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}))/
|
||||
}
|
||||
Keys.onPressed: (event)=>
|
||||
{
|
||||
if (event.key !== Qt.Key_Backspace)
|
||||
{
|
||||
var len = birthday.length
|
||||
var bd = birthday.text
|
||||
if (len === 2 || len === 5) birthday.text = bd + "."
|
||||
|
||||
Keys.onPressed: event => {
|
||||
if (event.key !== Qt.Key_Backspace) {
|
||||
var len = birthday.length;
|
||||
var bd = birthday.text;
|
||||
if (len === 2 || len === 5)
|
||||
birthday.text = bd + ".";
|
||||
}
|
||||
}
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Geburtsort*")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "placeofbirth"
|
||||
TextField {
|
||||
id: placeofbirth
|
||||
Layout.fillWidth: true
|
||||
onTextChanged: checkFields()
|
||||
Layout.columnSpan: 3
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
property string name: "placeofbirth"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Telefonnummer")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "phone"
|
||||
TextField {
|
||||
id: phonenumber
|
||||
|
||||
property string name: "phone"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||
}
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Mobil")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "mobile"
|
||||
TextField {
|
||||
id: cellphone
|
||||
|
||||
property string name: "mobile"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
|
||||
validator: RegularExpressionValidator {
|
||||
regularExpression: /([+0-9]{1})([0-9]{1,17})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("E-Mail")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "email"
|
||||
id: email
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
|
||||
onTextChanged: checkFields()
|
||||
placeholderText: qsTr("beispiel@domain.de")
|
||||
validator: RegularExpressionValidator
|
||||
{
|
||||
regularExpression: /([\+!#$%&‘\*\–\/\=?\^_`\.{|}\~\-\_0-9A-Za-z]{1,185})@([0-9A-Za-z\.\-\_]{1,64})\.([a-zA-z]{2,5})/
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Familienstand")
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
text: qsTr("E-Mail")
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
property string name: "maritalstatus"
|
||||
TextField {
|
||||
id: email
|
||||
|
||||
property string name: "email"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr("beispiel@domain.de")
|
||||
placeholderTextColor: "red"
|
||||
|
||||
validator: EmailAddressValidator {
|
||||
}
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Familienstand")
|
||||
}
|
||||
ComboBox {
|
||||
id: maritalstatus
|
||||
|
||||
property string name: "maritalstatus"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
editable: false
|
||||
model: [qsTr("ledig"), qsTr("verheiratet"), qsTr("verwitwet"), qsTr("geschieden")]
|
||||
visible: radio.children[1].checked
|
||||
Layout.columnSpan: 3
|
||||
}
|
||||
Label
|
||||
{
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Stundenlohn")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "salary"
|
||||
TextField {
|
||||
id: salary
|
||||
Layout.fillWidth: true
|
||||
visible: radio.children[1].checked
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Jobbeschreibung")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
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("Vertragsbeginn")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
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}))/
|
||||
}
|
||||
Keys.onPressed: (event)=>
|
||||
{
|
||||
if (event.key !== Qt.Key_Backspace)
|
||||
{
|
||||
var len = contractstart.length
|
||||
var bd = contractstart.text
|
||||
if (len === 2 || len === 5) contractstart.text = bd + "."
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Vertragsende")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
TextField
|
||||
{
|
||||
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}))/
|
||||
}
|
||||
Keys.onPressed: (event)=>
|
||||
{
|
||||
if (event.key !== Qt.Key_Backspace)
|
||||
{
|
||||
var len = contractend.length
|
||||
var bd = contractend.text
|
||||
if (len === 2 || len === 5) contractend.text = bd + "."
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: qsTr("Arbeitszeiten Tage")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: radio.children[1].checked
|
||||
}
|
||||
ComboBox
|
||||
{
|
||||
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
|
||||
{
|
||||
text: qsTr("Briefanrede")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
TextField
|
||||
{
|
||||
property string name: "formofaddress"
|
||||
id: briefAnrede
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
Layout.columnSpan: 3
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillHeight: true
|
||||
property string name: "salary"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Jobbeschreibung")
|
||||
}
|
||||
TextField {
|
||||
id: jobdescription
|
||||
|
||||
property string name: "jobdesc"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Vertragsbeginn")
|
||||
}
|
||||
TextField {
|
||||
id: contractstart
|
||||
|
||||
property string name: "contractstart"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
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}))/
|
||||
}
|
||||
|
||||
Keys.onPressed: event => {
|
||||
if (event.key !== Qt.Key_Backspace) {
|
||||
var len = contractstart.length;
|
||||
var bd = contractstart.text;
|
||||
if (len === 2 || len === 5)
|
||||
contractstart.text = bd + ".";
|
||||
}
|
||||
}
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Vertragsende")
|
||||
}
|
||||
TextField {
|
||||
id: contractend
|
||||
|
||||
property string name: "contractend"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
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}))/
|
||||
}
|
||||
|
||||
Keys.onPressed: event => {
|
||||
if (event.key !== Qt.Key_Backspace) {
|
||||
var len = contractend.length;
|
||||
var bd = contractend.text;
|
||||
if (len === 2 || len === 5)
|
||||
contractend.text = bd + ".";
|
||||
}
|
||||
}
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Arbeitszeiten Tage")
|
||||
}
|
||||
ComboBox {
|
||||
id: workdays
|
||||
|
||||
property string name: "workdays"
|
||||
|
||||
Layout.fillWidth: true
|
||||
model: ["1", "2", "3", "4", "5", "6", "7"]
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Stunden")
|
||||
}
|
||||
ComboBox {
|
||||
id: workhours
|
||||
|
||||
property string name: "workhours"
|
||||
|
||||
Layout.fillWidth: true
|
||||
model: ["1", "2", "3", "4", "5", "6", "7", "8"]
|
||||
}
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Briefanrede")
|
||||
}
|
||||
TextField {
|
||||
id: briefAnrede
|
||||
|
||||
property string name: "formofaddress"
|
||||
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
placeholderTextColor: "red"
|
||||
|
||||
onTextChanged: checkFields()
|
||||
}
|
||||
Item {
|
||||
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
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ Item
|
||||
Button
|
||||
{
|
||||
text: qsTr("Mitarbeiter zeigen")
|
||||
onClicked: employeesStack.pop()
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
}
|
||||
|
||||
142
Gui/Employees/EmployeesTable.qml
Normal file
142
Gui/Employees/EmployeesTable.qml
Normal file
@@ -0,0 +1,142 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: Dimensions.l
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Dimensions.l
|
||||
|
||||
SearchBar {
|
||||
}
|
||||
QuickFilter {
|
||||
model: ListModel {
|
||||
ListElement {
|
||||
name: "Alle"
|
||||
selected: true
|
||||
text: qsTr("Alle")
|
||||
}
|
||||
ListElement {
|
||||
name: "Bewerber"
|
||||
selected: false
|
||||
text: qsTr("Bewerber")
|
||||
}
|
||||
ListElement {
|
||||
name: "Mitarbeiter"
|
||||
selected: false
|
||||
text: qsTr("Kunde")
|
||||
}
|
||||
ListElement {
|
||||
name: "Erledigt"
|
||||
selected: false
|
||||
text: qsTr("Erledigt")
|
||||
}
|
||||
}
|
||||
|
||||
onSelectedChanged: name => {
|
||||
employee_model.viewCriterion(name);
|
||||
}
|
||||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
flat: true
|
||||
icon.source: "qrc:/images/PlusCircle.svg"
|
||||
text: qsTr("Bewerber Hinzufügen")
|
||||
|
||||
onClicked: contentStack.push("AddApplicant.qml")
|
||||
}
|
||||
Button {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
flat: true
|
||||
icon.source: "qrc:/images/PlusCircle.svg"
|
||||
text: qsTr("Mitarbeiter Hinzufügen")
|
||||
|
||||
onClicked: contentStack.push("AddEmployee.qml")
|
||||
}
|
||||
}
|
||||
ColumnLayout {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
spacing: 2
|
||||
|
||||
HorizontalHeaderView {
|
||||
movableColumns: true
|
||||
syncView: employeesTable
|
||||
|
||||
delegate: Rectangle {
|
||||
Layout.fillWidth: true
|
||||
color: Colors.primary
|
||||
implicitHeight: 33
|
||||
implicitWidth: 1
|
||||
|
||||
Text {
|
||||
color: Colors.primaryContrast
|
||||
elide: Text.ElideRight
|
||||
font: Typography.smallBold
|
||||
height: parent.height
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
padding: Dimensions.s
|
||||
text: model.display
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
}
|
||||
TableView {
|
||||
id: employeesTable
|
||||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
columnSpacing: 2
|
||||
model: employee_model
|
||||
resizableColumns: true
|
||||
rowSpacing: 2
|
||||
selectionBehavior: TableView.SelectRows
|
||||
z: 1
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
policy: ScrollBar.AsNeeded
|
||||
}
|
||||
delegate: Rectangle {
|
||||
required property bool selected
|
||||
|
||||
color: selected ? Colors.primaryHighlight : Colors.transparent
|
||||
implicitHeight: 33
|
||||
implicitWidth: employeesTable.width / employeesTable.columns
|
||||
|
||||
Text {
|
||||
color: Colors.foreground
|
||||
elide: Text.ElideRight
|
||||
font: Typography.small
|
||||
height: parent.height
|
||||
padding: Dimensions.s
|
||||
text: (model.display === null || model.display === undefined) ? "" : model.display
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
width: parent.width
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: {
|
||||
contentStack.push("EmployeeDetails.qml", {
|
||||
selectedEmployee: row
|
||||
});
|
||||
}
|
||||
onEntered: {
|
||||
employeesTable.selectionModel.select(employeesTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows);
|
||||
}
|
||||
}
|
||||
}
|
||||
selectionModel: ItemSelectionModel {
|
||||
model: employeesTable.model
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
Gui/Employees/qmldir
Normal file
1
Gui/Employees/qmldir
Normal file
@@ -0,0 +1 @@
|
||||
module Employees
|
||||
@@ -1,187 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
|
||||
function viewEmployees(criterion)
|
||||
{
|
||||
employee_model.viewCriterion(criterion)
|
||||
// employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: Dimensions.l
|
||||
|
||||
Component.onCompleted: employeesStack.pop()
|
||||
// property var availableFilters: ["Name", "Adresse", "PLZ", "Ort", "Status"]
|
||||
RowLayout
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
spacing: Dimensions.l
|
||||
SearchBar
|
||||
{
|
||||
id:searchBar
|
||||
}
|
||||
QuickFilter
|
||||
{
|
||||
onSelectedChanged: (name) =>
|
||||
{
|
||||
business_model.viewCriterion(name)
|
||||
}
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
ListElement
|
||||
{
|
||||
|
||||
name: "Alle"
|
||||
text: qsTr("Alle")
|
||||
selected: true
|
||||
}
|
||||
ListElement
|
||||
{
|
||||
name: "Bewerber"
|
||||
text: qsTr("Bewerber")
|
||||
selected: false
|
||||
}
|
||||
ListElement
|
||||
{
|
||||
name: "Mitarbeiter"
|
||||
text: qsTr("Kunde")
|
||||
selected: false
|
||||
}
|
||||
|
||||
ListElement
|
||||
{
|
||||
name: "Erledigt"
|
||||
text: qsTr("Erledigt")
|
||||
selected: false
|
||||
}
|
||||
}
|
||||
}
|
||||
Button
|
||||
{
|
||||
id: addEmployeeBtn
|
||||
text: qsTr("Mitarbeiter Hinzufügen")
|
||||
icon.source: "qrc:/images/PlusCircle.svg"
|
||||
Layout.alignment: Qt.AlignRight
|
||||
flat: true
|
||||
onClicked: appLoader.source = "AddApplicant.qml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HorizontalHeaderView
|
||||
{
|
||||
id: employeeTableHeader
|
||||
Layout.fillWidth: true
|
||||
syncView: appliEmpTable
|
||||
implicitHeight: 40
|
||||
movableColumns: true //@disable-check M16
|
||||
delegate: Rectangle
|
||||
{
|
||||
color: addEmployeeBtn.palette.alternateBase
|
||||
border.color: palette.base
|
||||
implicitHeight: 40
|
||||
Layout.fillWidth: true
|
||||
implicitWidth: 1
|
||||
Text
|
||||
{
|
||||
text: model.display
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
color: palette.text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TableView
|
||||
{
|
||||
id: appliEmpTable
|
||||
//Layout.fillHeight: true
|
||||
//height: tableParent.height - (viewCriterion.height + employeeTableHeader.height)
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
columnSpacing: 1
|
||||
rowSpacing: 2
|
||||
alternatingRows: true
|
||||
resizableColumns: true
|
||||
model: employee_model
|
||||
selectionBehavior: TableView.SelectRows
|
||||
z: 1
|
||||
ScrollBar.vertical: ScrollBar
|
||||
{
|
||||
policy: appliEmpTable.contentHeight > appliEmpTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
|
||||
}
|
||||
|
||||
selectionModel: ItemSelectionModel
|
||||
{
|
||||
id: selModel
|
||||
model: appliEmpTable.model
|
||||
}
|
||||
|
||||
|
||||
delegate:Rectangle
|
||||
{
|
||||
required property bool selected
|
||||
required property bool current
|
||||
implicitWidth: appliEmpTable.width / appliEmpTable.columns
|
||||
implicitHeight: 25
|
||||
color: selected
|
||||
? addEmployeeBtn.palette.highlight //palette.highlight
|
||||
: (appliEmpTable.alternatingRows && row % 2 !== 0
|
||||
? addEmployeeBtn.palette.base // palette.base
|
||||
: addEmployeeBtn.palette.alternateBase) //palette.alternateBase)
|
||||
|
||||
Text
|
||||
{
|
||||
text: (model.display === null || model.display === undefined)? "": model.display
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: 9 //@d isable-check M16
|
||||
color: palette.text
|
||||
|
||||
}
|
||||
|
||||
MouseArea
|
||||
{
|
||||
id: mouseArea
|
||||
property bool hovered:false
|
||||
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onDoubleClicked:
|
||||
{
|
||||
employeesStack.push("EmployeeDetails.qml", {selectedEmployee: row});
|
||||
}
|
||||
|
||||
onEntered:
|
||||
{
|
||||
appliEmpTable.selectionModel.select(appliEmpTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item
|
||||
{
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
// function viewEmployees(criterion)
|
||||
// {
|
||||
// employee_model.viewCriterion(criterion, showProcessed.checked, showFired.checked, showEveryone.checked)
|
||||
// }
|
||||
// Component.onCompleted: employeesStack.pop()
|
||||
|
||||
@@ -77,7 +77,7 @@ Item
|
||||
title: qsTr("Wiederherstellen")
|
||||
buttons: MessageDialog.Yes | MessageDialog.No
|
||||
onAccepted: recoveryPaswordDialog.open()
|
||||
onRejected: gotoLogin()
|
||||
onRejected: contentStack.replace("LoginSreen.qml")
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
@@ -147,7 +147,7 @@ Item
|
||||
if (!adminAvailable) config.saveRecoveryKey(saveRecoveryDialog.currentFile, recpass)
|
||||
else config.getRecoveryKey(saveRecoveryDialog.currentFile, recpass)
|
||||
|
||||
gotoLogin()
|
||||
contentStack.replace("LoginSreen.qml")
|
||||
}
|
||||
|
||||
onRejected:
|
||||
|
||||
@@ -4,20 +4,19 @@ import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
Item {
|
||||
property string recpass: ""
|
||||
|
||||
function dbConnectionFailed(msg) {
|
||||
oschkar.notificationBox.informativeText = msg;
|
||||
oschkar.notificationBox.text = "Verbindung zum Datenbankserver verloren";
|
||||
oschkar.notificationBox.open();
|
||||
notifications.notificationDialog.informativeText = msg;
|
||||
notifications.notificationDialog.text = "Verbindung zum Datenbankserver verloren";
|
||||
notifications.notificationDialog.open();
|
||||
}
|
||||
function getEncryptionKey() {
|
||||
recoveryPaswordDialog.open();
|
||||
}
|
||||
function loggedin() {
|
||||
appLoader.source = "Dashboard.qml";
|
||||
contentStack.replace("Dashboard.qml");
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
@@ -79,8 +78,8 @@ Item {
|
||||
}
|
||||
Button {
|
||||
Layout.topMargin: Dimensions.m
|
||||
implicitWidth: parent.width
|
||||
icon.source: "qrc:/images/ArrowRightEndOnRectangle.svg"
|
||||
implicitWidth: parent.width
|
||||
text: qsTr("Login")
|
||||
|
||||
onClicked: {
|
||||
@@ -132,8 +131,7 @@ Item {
|
||||
onRejected: quit()
|
||||
}
|
||||
Notifications {
|
||||
id: oschkar
|
||||
|
||||
id: notifications
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,92 +3,79 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
property bool onSubPage: false
|
||||
|
||||
height: parent.height
|
||||
spacing: 0
|
||||
z: 3
|
||||
|
||||
Component.onCompleted: {
|
||||
onSubPage = Qt.binding(() => contentStack.depth > 1);
|
||||
}
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
ButtonGroup {
|
||||
id: buttonBar
|
||||
id: mainNav
|
||||
|
||||
}
|
||||
BarButton {
|
||||
id: dashBoard
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/dash.svg"
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/Square3Stack3D-Outline.svg"
|
||||
target: "/Gui/Dashboard.qml"
|
||||
text: qsTr("Dashboard")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "Dashboard.qml";
|
||||
}
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: kunden
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/customer.svg"
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/UserGroup-Outline.svg"
|
||||
target: "/Gui/CustomersTable.qml"
|
||||
text: qsTr("Kunden")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "CustomerTable.qml";
|
||||
}
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: objekt
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/object.svg"
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/BuildingOffice2-Outline.svg"
|
||||
target: "/Gui/ObjectsTable.qml"
|
||||
text: qsTr("Objekt")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "ObjectTable.qml";
|
||||
}
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: mitarbeiter
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/employee.svg"
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/Identification-Outline.svg"
|
||||
target: "/Gui/Employees/EmployeesTable.qml"
|
||||
text: qsTr("Mitarbeiter")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "EmployeeTable.qml";
|
||||
}
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: offers
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/offer.svg"
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/RectangleStack-Outline.svg"
|
||||
target: "/Gui/OffersTable.qml"
|
||||
text: qsTr("Angebote")
|
||||
|
||||
onClicked: {
|
||||
appLoader.source = "OfferTable.qml";
|
||||
}
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: abrechnung
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
icon.source: "qrc:/images/invoice.svg"
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/Wallet-Outline.svg"
|
||||
text: qsTr("Abrechnung")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
icon.source: "qrc:/images/ArrowLeftCircle-Outline.svg"
|
||||
text: qsTr("Zurück")
|
||||
visible: onSubPage
|
||||
checkable: false
|
||||
|
||||
onClicked: contentStack.pop();
|
||||
}
|
||||
Item {
|
||||
id: hspacer
|
||||
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
BarButton {
|
||||
id: atajos
|
||||
|
||||
Layout.bottomMargin: Dimensions.s
|
||||
checkable: false
|
||||
flat: true
|
||||
icon.source: "qrc:/images/Bars3.svg"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
|
||||
onClicked: mainMenu.open()
|
||||
|
||||
@@ -101,7 +88,8 @@ ColumnLayout {
|
||||
onTriggered: {
|
||||
// TODO: Check if logged-in user is admin first!!
|
||||
|
||||
appLoader.source = "PyqcrmConf.qml";
|
||||
contentStack.push("PyqcrmConf.qml");
|
||||
|
||||
}
|
||||
}
|
||||
MenuSeparator {
|
||||
|
||||
@@ -1,74 +1,27 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Rectangle
|
||||
{
|
||||
anchors.fill: parent
|
||||
color: "slateblue"
|
||||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: Dimensions.s
|
||||
height: implicitHeight
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: info
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "slateblue"
|
||||
implicitHeight: 55
|
||||
implicitWidth: parent.width / 4
|
||||
y: parent.height / 4
|
||||
Text
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
text: qsTr("Keine Verbindung zur Datenbank!")
|
||||
color: "moccasin"
|
||||
font.bold: true
|
||||
font.pixelSize: 45
|
||||
}
|
||||
H1 {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: qsTr("Keine Verbindung zur Datenbank!")
|
||||
color: Colors.foreground
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: nostart
|
||||
anchors.top: info.bottom
|
||||
color: "slateblue"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
implicitHeight: 55
|
||||
implicitWidth: parent.width / 4
|
||||
Text
|
||||
{
|
||||
text: qsTr("Programm kann nicht starten..")
|
||||
color: "moccasin"
|
||||
anchors.centerIn: parent
|
||||
font.bold: true
|
||||
font.pixelSize: 45
|
||||
}
|
||||
H2 {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: qsTr("Programm kann nicht starten…")
|
||||
color: Colors.foreground
|
||||
}
|
||||
Button {
|
||||
Layout.topMargin: Dimensions.l
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
text: qsTr("Beenden")
|
||||
|
||||
Rectangle
|
||||
{
|
||||
anchors.top: nostart.bottom
|
||||
anchors.topMargin: 25
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "slateblue"
|
||||
implicitHeight: 55
|
||||
implicitWidth: parent.width / 4
|
||||
Button
|
||||
{
|
||||
width: parent.width
|
||||
height: 75
|
||||
Text
|
||||
{
|
||||
text: qsTr("Beenden")
|
||||
color: "moccasin"
|
||||
anchors.centerIn: parent
|
||||
font.bold: true
|
||||
font.pixelSize: 45
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
background: Rectangle
|
||||
{
|
||||
color: "dodgerblue"
|
||||
radius: 50
|
||||
}
|
||||
onClicked: Qt.quit()
|
||||
}
|
||||
onClicked: Qt.quit()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@ import QtQuick.Dialogs
|
||||
|
||||
Item
|
||||
{
|
||||
id: oschkar
|
||||
property alias notificationBox: notificationDialog
|
||||
MessageDialog
|
||||
{
|
||||
id: notificationDialog
|
||||
|
||||
@@ -16,7 +16,7 @@ Item
|
||||
Button
|
||||
{
|
||||
text: qsTr("Zurück zu den Objekten")
|
||||
onClicked: objectsStack.pop()
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
Item {
|
||||
property var availableFilters: [""]
|
||||
anchors.fill: parent
|
||||
|
||||
StackView
|
||||
{
|
||||
id: objectsStack
|
||||
anchors.fill: parent
|
||||
initialItem: "ObjectsTable.qml"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,9 +5,11 @@ import Qt.labs.qmlmodels
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
property var availableFilters: [""]
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: Dimensions.l
|
||||
|
||||
|
||||
function viewCriterion(criterion)
|
||||
{
|
||||
business_model.viewCriterion(criterion.text);
|
||||
@@ -21,7 +23,7 @@ ColumnLayout
|
||||
Component.onCompleted:
|
||||
{
|
||||
contact_model.objectContactAdded.connect(onObjectContactAdded)
|
||||
objectsStack.pop()
|
||||
contentStack.pop()
|
||||
}
|
||||
RowLayout
|
||||
{
|
||||
@@ -65,7 +67,7 @@ ColumnLayout
|
||||
icon.source: "qrc:/images/PlusCircle.svg"
|
||||
text: qsTr("Objekt Hinzufügen")
|
||||
Layout.alignment: Qt.AlignRight
|
||||
onClicked: appLoader.source = "AddObject.qml"
|
||||
onClicked: contentStack.push("AddObject.qml")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +169,7 @@ ColumnLayout
|
||||
hoverEnabled: true
|
||||
onDoubleClicked:
|
||||
{
|
||||
objectsStack.push("ObjectDetails.qml", {selectedObject: row});
|
||||
contentStack.push("ObjectDetails.qml", {selectedObject: row});
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import Qt.labs.qmlmodels
|
||||
|
||||
|
||||
Item
|
||||
{
|
||||
anchors.fill: parent
|
||||
StackView
|
||||
{
|
||||
id: offersStack
|
||||
anchors.fill: parent
|
||||
initialItem: "OffersTable.qml"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,17 +20,9 @@ ColumnLayout
|
||||
{
|
||||
id: searchBar
|
||||
}
|
||||
QuickFilter
|
||||
{
|
||||
onSelectedChanged: (name) =>
|
||||
{
|
||||
business_model.viewCriterion(name)
|
||||
}
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
ListElement
|
||||
{
|
||||
QuickFilter {
|
||||
model: ListModel {
|
||||
ListElement {
|
||||
name: "Alle"
|
||||
text: qsTr("Alle")
|
||||
selected: true
|
||||
@@ -43,10 +35,19 @@ ColumnLayout
|
||||
}
|
||||
ListElement
|
||||
{
|
||||
name: "Abgesagt"
|
||||
text: qsTr("Abgesagt")
|
||||
name: "Abgeschlossen"
|
||||
selected: false
|
||||
text: qsTr("Abgeschlossen")
|
||||
}
|
||||
ListElement {
|
||||
name: "Erledigt"
|
||||
selected: false
|
||||
text: qsTr("Erledigt")
|
||||
}
|
||||
}
|
||||
|
||||
onSelectedChanged: name => {
|
||||
business_model.viewCriterion(name);
|
||||
}
|
||||
}
|
||||
Button
|
||||
@@ -62,8 +63,5 @@ ColumnLayout
|
||||
Item {
|
||||
id: spacer
|
||||
Layout.fillHeight: true
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ Item
|
||||
Button
|
||||
{
|
||||
text: qsTr("Ablehnen")
|
||||
onClicked: appLoader.source = "Dashboard.qml"
|
||||
onClicked: contentStack.pop()
|
||||
}
|
||||
|
||||
Button
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
TextField {
|
||||
Layout.preferredWidth: 300
|
||||
placeholderText: qsTr("Suche")
|
||||
|
||||
Button {
|
||||
icon.source: "qrc:/images/MagnifyingGlass.svg"
|
||||
isFieldButton: true
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ Item
|
||||
title: qsTr("Wiederherstellen")
|
||||
buttons: MessageDialog.Yes | MessageDialog.No
|
||||
onAccepted: recoveryPasswordDialog.open()
|
||||
onRejected: gotoLogin()
|
||||
onRejected: contentStack.replace("LoginSreen.qml")
|
||||
}
|
||||
|
||||
MessageDialog
|
||||
|
||||
24
Gui/main.qml
24
Gui/main.qml
@@ -10,10 +10,6 @@ ApplicationWindow {
|
||||
property string confile: ""
|
||||
property alias settingsFileDialog: settingsFiledialog
|
||||
|
||||
function goToLogin() {
|
||||
appLoader.source = "LoginScreen.qml";
|
||||
navigation.visible = true;
|
||||
}
|
||||
function showWindow(why) {
|
||||
if (why === 3) {
|
||||
systray.setVisible(false);
|
||||
@@ -21,25 +17,25 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
color: Colors.mantle
|
||||
font: Typography.body
|
||||
height: Screen.height * .85
|
||||
palette.window: Colors.mantle
|
||||
palette.placeholderText: Colors.interactive
|
||||
palette.text: Colors.foreground
|
||||
title: "TERO Personal"
|
||||
visible: true
|
||||
width: Screen.width * .75
|
||||
|
||||
Component.onCompleted: {
|
||||
config.configurationReady.connect(goToLogin);
|
||||
systray.activated.connect(showWindow);
|
||||
|
||||
if (bad_config) {
|
||||
importDialog.open();
|
||||
} else {
|
||||
if (db_con)
|
||||
appLoader.source = "LoginScreen.qml";
|
||||
contentStack.replace("LoginScreen.qml")
|
||||
else
|
||||
appLoader.source = "NoDbConnection.qml";
|
||||
contentStack.replace("NoDbConnection.qml");
|
||||
}
|
||||
}
|
||||
onClosing: close => {
|
||||
@@ -63,7 +59,7 @@ ApplicationWindow {
|
||||
Navigation {
|
||||
id: navigation
|
||||
|
||||
visible: bad_config || !db_con ? false : true
|
||||
visible: !(bad_config || !db_con)
|
||||
}
|
||||
PrinterDialog {
|
||||
id: printerDialog
|
||||
@@ -82,17 +78,15 @@ ApplicationWindow {
|
||||
id: contentBackground
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: navigation.right
|
||||
left: navigation.visible ? navigation.right : parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
}
|
||||
color: Colors.background
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: appLoader
|
||||
|
||||
property alias window: appWindow
|
||||
StackView {
|
||||
id: contentStack
|
||||
|
||||
anchors {
|
||||
fill: contentBackground
|
||||
@@ -109,7 +103,7 @@ ApplicationWindow {
|
||||
title: qsTr("Einstellungen importieren")
|
||||
|
||||
onAccepted: settingsFiledialog.open()
|
||||
onRejected: appLoader.source = "Firststart.qml"
|
||||
onRejected: contentStack.replace("Firststart.qml")
|
||||
}
|
||||
FileDialog {
|
||||
id: settingsFiledialog
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
module gui
|
||||
TopBar 1.0 Navigation.qml
|
||||
Navigation 1.0 Navigation.qml
|
||||
|
||||
Reference in New Issue
Block a user