Added Scrollview in all forms, debugged error in AddEmployee.qml

This commit is contained in:
2025-05-23 14:17:35 +02:00
parent 096f60a2ec
commit bcc8e3a015
3 changed files with 241 additions and 223 deletions

View File

@@ -1,49 +1,51 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import TeroStyle
import Js
ColumnLayout {
ScrollView
{
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()
Component.onCompleted: {
employee_model.addedNewEmployee.connect(successful => {
if (successful)
contentStack.pop();
});
}
Button
{
enabled: applicantForm.valid
icon.source: "qrc:/images/CheckCircle.svg"
text: qsTr("Speichern")
onClicked:
ApplicantForm
{
id: applicantForm
Layout.alignment: Qt.AlignTop
Layout.fillHeight: true
Layout.verticalStretchFactor: 1
}
RowLayout
{
Layout.alignment: Qt.AlignRight
spacing: Dimensions.l
Button
{
employee_model.addApplicant(applicantForm.value);
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);
}
}
}
}