A lot of changes going on

This commit is contained in:
2025-05-13 16:40:48 +02:00
parent 3ff830b3e2
commit 5b16432767
37 changed files with 4332 additions and 183 deletions

View File

@@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Dialogs
import "../js/qmldict.js" as JsLib
import Js
ColumnLayout
{

View File

@@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Dialogs
import "../js/qmldict.js" as JsLib
import Js
ColumnLayout
{
@@ -70,8 +70,13 @@ ColumnLayout
text: qsTr("Speichern")
enabled: false
onClicked:
{
new_object = JsLib.parseForm(newObject)
// For Debugging
console.log(JSON.stringify(new_object))
//
new_object['lift'] = new_object['lift'] === 'Ja' ? 1 : 0
new_object['mezzanin'] = new_object['mezzanin'] === 'Ja' ? 1 : 0
object_model.addObject(new_object)

View File

@@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Dialogs
import QtCore
import "../js/qmldict.js" as JsLib
import Js

View File

@@ -1,8 +1,7 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import "../../js/qmldict.js" as JsLib
import Js
ColumnLayout {
id: colPar
@@ -46,7 +45,7 @@ ColumnLayout {
Layout.fillWidth: true
Layout.horizontalStretchFactor: 1
ApplicantPersonalData {
EmployeePersonalData {
id: personalData
implicitWidth: parent.width
@@ -61,14 +60,14 @@ ColumnLayout {
Layout.alignment: Qt.AlignTop
implicitWidth: parent.width
ApplicantBankData {
EmployeeBankData {
id: bankAccount
}
ApplicantNationalInsurance {
EmployeeNationalInsurance {
id: nationalInsurance
}
ApplicantVarious {
EmployeeVarious {
id: applicantVarious
}

View File

@@ -3,11 +3,12 @@ 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 {
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

View File

@@ -52,7 +52,7 @@ ColumnLayout {
BarButton {
ButtonGroup.group: mainNav
icon.source: "qrc:/images/RectangleStack-Outline.svg"
target: "/Gui/OffersTable.qml"
target: "/Gui/Offers/OffersTable.qml"
text: qsTr("Angebote")
visible: !onSubPage
}

View File

@@ -1,7 +1,7 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import "../js/qmldict.js" as JsLib
import Js
Frame
{

View File

@@ -52,37 +52,6 @@ GridLayout
//// New grid row
Label
{
text: qsTr("Straße")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
TextField
{
property string name: "street"
id: street
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
// onTextChanged: checkFields()
}
Label
{
text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
TextField
{
property string name: "houseno"
id: houseno
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
// onTextChanged: checkFields()
}
// New grid row
Label
{
text: qsTr("PLZ")
@@ -102,7 +71,11 @@ GridLayout
textRole: "display"
popup.height: 300
currentIndex: -1
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
onCurrentIndexChanged:
{
city.currentIndex = postcode.currentIndex
}
validator: RegularExpressionValidator
{
@@ -131,6 +104,41 @@ GridLayout
currentIndex: -1
}
Label
{
text: qsTr("Straße")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
ComboBox
{
property string name: "street"
id: street
model: object_model
textRole: "StreetInPostcode"
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
// onTextChanged: checkFields()
}
Label
{
text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
ComboBox
{
property string name: "houseno"
id: houseno
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
// onTextChanged: checkFields()
}
// New grid row
//New Grid
Label
{
@@ -184,6 +192,7 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
}
Item
{
Layout.columnSpan: 2
@@ -194,16 +203,13 @@ GridLayout
text: qsTr("Leistungen:")
Layout.alignment: Qt.AlignRight
font: Typography.h2
}
Item
{
Layout.columnSpan: 3
}
Item
{
Layout.fillHeight: true

View File

@@ -2,7 +2,8 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Dialogs
import "../js/qmldict.js" as JsLib
import Js
ColumnLayout
{
@@ -27,18 +28,15 @@ ColumnLayout
Layout.fillHeight: true
spacing: 45
Frame
AddNewOffer
{
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
AddNewOffer
{
id: newOffer
width: parent.width
}
id: newOffer
width: parent.width
}
}
RowLayout
{
@@ -51,16 +49,17 @@ ColumnLayout
}
Button
{
property var new_object: null
id: saveBtn
text: qsTr("Speichern")
enabled: false
// enabled: false
onClicked:
{
// new_object = JsLib.parseForm(newObject)
// new_object['lift'] = new_object['lift'] === 'Ja' ? 1 : 0
// new_object['mezzanin'] = new_object['mezzanin'] === 'Ja' ? 1 : 0
// object_model.addObject(new_object)
}
}
}

View File

@@ -57,7 +57,7 @@ ColumnLayout
icon.source: "qrc:/images/PlusCircle.svg"
Layout.alignment: Qt.AlignRight
flat: true
onClicked: appLoader.source = "AddOffer.qml"
onClicked: contentStack.push("AddOffer.qml")
}
}
Item {

1
Gui/Offers/qmldir Normal file
View File

@@ -0,0 +1 @@
module Offers

View File

@@ -1,87 +0,0 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
ColumnLayout {
function viewOffers(criterion) {
//offer_model.viewCriterion(criterion)
}
anchors.fill: parent
spacing: Dimensions.l
RowLayout {
Layout.fillWidth: true
spacing: Dimensions.l
SearchBar {
id: searchBar
}
<<<<<<< HEAD
QuickFilter
{
onSelectedChanged: (name) =>
{
business_model.viewCriterion(name)
}
model: ListModel
{
ListElement
{
=======
QuickFilter {
model: ListModel {
ListElement {
>>>>>>> main
name: "Alle"
selected: true
text: qsTr("Alle")
}
ListElement {
name: "Offen"
selected: false
text: qsTr("Offen")
}
<<<<<<< HEAD
ListElement
{
name: "Abgesagt"
text: qsTr("Abgesagt")
=======
ListElement {
name: "Abgeschlossen"
selected: false
text: qsTr("Abgeschlossen")
}
ListElement {
name: "Erledigt"
>>>>>>> main
selected: false
text: qsTr("Erledigt")
}
}
onSelectedChanged: name => {
business_model.viewCriterion(name);
}
}
Button {
id: addOfferBtn
Layout.alignment: Qt.AlignRight
flat: true
icon.source: "qrc:/images/PlusCircle.svg"
text: qsTr("Angebote Hinzufügen")
onClicked: contentStack.push("AddOffer.qml")
}
}
Item {
id: spacer
Layout.fillHeight: true
}
}