Merge main

This commit is contained in:
2025-03-21 13:45:53 +01:00
37 changed files with 328 additions and 258 deletions

View File

@@ -16,7 +16,7 @@ GridLayout
Label
{
text: qsTr("Straße")
text: qsTr("Straße*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -27,13 +27,11 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Nr.")
text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -44,8 +42,6 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
// New grid row
@@ -197,7 +193,7 @@ GridLayout
Label
{
text: qsTr("Reinigungsmittel wo?")
text: qsTr("Reinigungsmittel wo?*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -206,8 +202,6 @@ GridLayout
property string name: "cleaningproducts"
id: cleaningproducts
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
}
Item

View File

@@ -37,7 +37,7 @@ GridLayout
}
Label
{
text: qsTr("Vorname")
text: qsTr("Vorname*")
Layout.alignment: Qt.AlignRight
}
TextField
@@ -45,14 +45,12 @@ GridLayout
property string name: "firstname"
id: firstname
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
}
Label
{
text: qsTr("Nachname")
text: qsTr("Nachname*")
Layout.alignment: Qt.AlignRight
}
TextField
@@ -60,8 +58,6 @@ GridLayout
property string name: "lastname"
id: lastname
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
}
@@ -164,7 +160,7 @@ GridLayout
}
Label
{
text: qsTr("Geburtsdatum")
text: qsTr("Geburtsdatum*")
Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked
}
@@ -173,8 +169,6 @@ GridLayout
property string name: "birthday"
id: birthday
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
visible: radio.children[1].checked
@@ -195,7 +189,7 @@ GridLayout
Label
{
text: qsTr("Geburtsort")
text: qsTr("Geburtsort*")
Layout.alignment: Qt.AlignRight
visible: radio.children[1].checked
}
@@ -204,8 +198,6 @@ GridLayout
property string name: "placeofbirth"
id: placeofbirth
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
Layout.columnSpan: 3
visible: radio.children[1].checked

View File

@@ -16,11 +16,10 @@ GridLayout
Label
{
id: lblFirmenName
text: qsTr("Firmenname")
text: qsTr("Firmenname*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
TextField
{
property string name: "business"
@@ -29,34 +28,26 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
Layout.columnSpan: 3
}
Label
{
text: qsTr("Straße")
text: qsTr("Straße*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
TextField
{
property string name: "street"
id: streetid
Layout.fillWidth: true
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Nr.")
text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -66,8 +57,6 @@ GridLayout
id: housenoid
Layout.fillWidth: true
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
validator: RegularExpressionValidator
{
regularExpression: /([0-9a-zA-Z\-]{1,6})/

View File

@@ -3,175 +3,159 @@ import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
Item
{
SearchBar
{
id:searchBar
anchors.margins: 9
ColumnLayout {
function viewCriterion(criterion) {
business_model.viewCriterion(criterion.text);
}
Button
{
id: addBusinessBtn
icon.source: "qrc:/images/addbusiness.svg"
icon.color: "olive"
anchors.right: parent.right
flat: true
onClicked: appLoader.source = "AddCustomer.qml"
}
anchors.fill: parent
ColumnLayout
{
id: tableColumn
Component.onCompleted: customersStack.pop()
RowLayout {
Layout.fillWidth: true
Layout.horizontalStretchFactor: 1
spacing: Dimensions.l
SearchBar {
}
QuickFilter {
onSelectedChanged: (name) => {
business_model.viewCriterion(name)
}
model: ListModel {
ListElement {
name: "Alle"
text: qsTr("Alle")
selected: true
}
ListElement {
name: "showProvider"
text: qsTr("Interessent")
selected: false
}
ListElement {
name: "showClientele"
text: qsTr("Kunde")
selected: false
}
ListElement {
name: "showProvider"
text: qsTr("Lieferant")
selected: false
}
ListElement {
name: "showFinished"
text: qsTr("Erledigt")
selected: false
}
}
}
Button {
id: addCustomer
Layout.alignment: Qt.AlignRight
icon.source: "qrc:/images/PlusCircle.svg"
text: qsTr("Kunde Hinzufügen")
onClicked: appLoader.source = "AddCustomer.qml"
}
}
ColumnLayout {
clip: true
anchors
{
top: searchBar.bottom
bottom: parent.bottom
left: parent.left
right: parent.right
}
RowLayout
{
id: sortView
RadioButton
{
id: showAll
checked: true
text: qsTr("Alle")
onClicked: viewCriterion(showAll)
}
RadioButton
{
id: showInterested
text: qsTr("Interessent")
onClicked: viewCriterion(showInterested)
}
RadioButton
{
id: showClientele
text: qsTr("Kunden")
onClicked: viewCriterion(showClientele)
}
RadioButton
{
id: showProvider
text: qsTr("Lieferant")
onClicked: viewCriterion(showProvider)
}
RadioButton
{
id: showFinished
text: qsTr("Erledigt")
onClicked: viewCriterion(showFinished)
}
}
HorizontalHeaderView
{
HorizontalHeaderView {
id: horizontalHeader
Layout.fillWidth: true
implicitHeight: 40
movableColumns: true //@disable-check M16
syncView: customerTable
delegate: Rectangle
{
color: addBusinessBtn.palette.alternateBase
border.color: addBusinessBtn.palette.base
implicitHeight: 40
delegate: Rectangle {
Layout.fillWidth: true
border.color: addCustomer.palette.base
color: addCustomer.palette.alternateBase
implicitHeight: 40
implicitWidth: 1
Text
{
text: model.display
Text {
color: addCustomer.palette.text
elide: Text.ElideRight
width: parent.width
height: parent.height
horizontalAlignment: Text.AlignHCenter
text: model.display
verticalAlignment: Text.AlignVCenter
color: addBusinessBtn.palette.text
width: parent.width
}
}
}
TableView
{
property real newWidth: 0
TableView {
id: customerTable
z: 1
property real newWidth: 0
Layout.fillHeight: true
//height: tableColumn.height - (sortView.height + horizontalHeader.height)
Layout.fillWidth: true
columnSpacing: 1
rowSpacing: 2
model: business_model
alternatingRows: true
columnSpacing: 1
model: business_model
resizableColumns: true
rowSpacing: 2
selectionBehavior: TableView.SelectRows
ScrollBar.vertical: ScrollBar
{
z: 1
ScrollBar.vertical: ScrollBar {
policy: customerTable.contentHeight > customerTable.height ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff
}
selectionModel: ItemSelectionModel
{
id: selModel
model: customerTable.model
}
delegate:Rectangle
{
required property bool selected
delegate: Rectangle {
required property bool current
implicitWidth: customerTable.width / customerTable.columns
required property bool selected
color: selected ? addCustomer.palette.highlight //palette.highlight
: (customerTable.alternatingRows && row % 2 !== 0 ? addCustomer.palette.base // palette.base
: addCustomer.palette.alternateBase) //palette.alternateBase)
implicitHeight: 25
color: selected
? addBusinessBtn.palette.highlight //palette.highlight
: (customerTable.alternatingRows && row % 2 !== 0
? addBusinessBtn.palette.base // palette.base
: addBusinessBtn.palette.alternateBase) //palette.alternateBase)
Text
{
text: model.display == null? "": model.display // @disable-check M126
implicitWidth: customerTable.width / customerTable.columns
Text {
color: addCustomer.palette.text
elide: Text.ElideRight
width: parent.width
height: parent.height
verticalAlignment: Text.AlignVCenter
leftPadding: 9
color: addBusinessBtn.palette.text
text: model.display == null ? "" : model.display // @disable-check M126
verticalAlignment: Text.AlignVCenter
width: parent.width
}
MouseArea
{
property bool hovered: false
MouseArea {
id: mouseArea
property bool hovered: false
anchors.fill: parent
hoverEnabled: true
onDoubleClicked:
{
business_model.onRowClicked(row)
customersStack.push("CustomerDetails.qml", {selectedClient: row});
}
onEntered:
{
customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows)
onDoubleClicked: {
business_model.onRowClicked(row);
customersStack.push("CustomerDetails.qml", {
selectedClient: row
});
}
onEntered: {
customerTable.selectionModel.select(customerTable.model.index(row, 0), ItemSelectionModel.SelectCurrent | ItemSelectionModel.Rows);
}
}
}
}
selectionModel: ItemSelectionModel {
id: selModel
Item
{
model: customerTable.model
}
}
Item {
Layout.fillWidth: true
}
}
function viewCriterion(criterion)
{
business_model.viewCriterion(criterion.text)
}
Component.onCompleted: customersStack.pop()
}

View File

@@ -16,8 +16,8 @@ Item
Button
{
id: addEmployeeBtn
icon.source: "qrc:/images/addbusiness.svg"
icon.color: "olive"
text: qsTr("Mitarbeiter Hinzufügen")
icon.source: "qrc:/images/PlusCircle.svg"
anchors.right: parent.right
flat: true
onClicked: appLoader.source = "AddApplicant.qml"

View File

@@ -32,16 +32,15 @@ Item {
}
ColumnLayout {
spacing: Dimensions.m
anchors.centerIn: parent
spacing: Dimensions.m
Label {
font: Typography.h1
text: qsTr("Login")
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: Dimensions.l
font: Typography.h1
text: qsTr("Login")
}
Field {
label: qsTr("Benutzername")
@@ -78,11 +77,11 @@ Item {
}
}
}
Button {
Layout.topMargin: Dimensions.m
implicitWidth: parent.width
icon.source: "qrc:/images/ArrowRightEndOnRectangle.svg"
text: qsTr("Login")
width: parent.width
onClicked: {
if (benutzerName.text.trim() && passwort.text.trim())

View File

@@ -35,71 +35,45 @@ GridLayout
}
Label
{
text: qsTr("Vorname")
text: qsTr("Vorname*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: firstname
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
// onTextChanged: checkContactFields()
}
Label
{
text: qsTr("Nachname")
text: qsTr("Nachname*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: lastname
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Telefonnummer")
text: mobile.text ? qsTr("Telefonnummer") : qsTr("Telefonnummer*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: phonenumber
Layout.fillWidth: true
placeholderText: mobile.text ? "" : "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Mobil")
text: phonenumber.text ? qsTr("Mobil") : qsTr("Mobil*")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: mobile
Layout.fillWidth: true
placeholderText: phonenumber.text ? "" : "Pflichtfeld"
placeholderTextColor: "red"
}
// Label
// {
// text: qsTr("Position")
// Layout.alignment: Qt.AlignRight
// }
// TextField
// {
// id: posizion
// Layout.fillWidth: true
// placeholderText: "Pflichtfeld"
// placeholderTextColor: "red"
// }
RowLayout
{

View File

@@ -27,7 +27,7 @@ GridLayout
Label
{
text: qsTr("Straße")
text: qsTr("Straße*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -38,12 +38,10 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("Nr.")
text: qsTr("Nr.*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -54,13 +52,11 @@ GridLayout
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{
text: qsTr("PLZ")
text: qsTr("PLZ*")
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
}
@@ -70,8 +66,6 @@ GridLayout
id: postcode
Layout.fillWidth: true
onTextChanged: checkFields()
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
}
Label
{

View File

@@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.qmlmodels
Item
{
@@ -13,10 +14,9 @@ Item
Button
{
id: addObjectBtn
icon.source: "qrc:/images/addbusiness.svg"
icon.color: "olive"
icon.source: "qrc:/images/PlusCircle.svg"
text: qsTr("Objekt Hinzufügen")
anchors.right: parent.right
flat: true
onClicked: appLoader.source = "AddObject.qml"
}

View File

@@ -76,6 +76,5 @@ RowLayout
{
console.log(filter)
console.log(activated)
}
}

View File

@@ -225,12 +225,10 @@ ColumnLayout
BarButton
{
id: atajos
icon.source: "qrc:/images/menu.svg"
implicitWidth: 90
implicitHeight: 90
checkable: false
icon.source: "qrc:/images/Bars3.svg"
flat: true
Layout.bottomMargin: Dimensions.s
onClicked: mainMenu.open()

View File

@@ -16,6 +16,8 @@ ApplicationWindow
property string confile: ""
property alias settingsFileDialog: settingsFiledialog
palette.text: Colors.foreground
TopBar
{
@@ -45,11 +47,13 @@ ApplicationWindow
anchors
{
left: topBar.right
right: parent.right
top: parent.top
bottom: parent.bottom
margins: Dimensions.s
fill: parent
topMargin: Dimensions.l
bottomMargin: Dimensions.l
rightMargin: Dimensions.l
leftMargin: Dimensions.l
}
property alias window: appWindow