Validate applicant and call database procedure

This commit is contained in:
Yuri Becker
2025-04-15 15:24:31 +02:00
parent a720dfebeb
commit f0382a960e
15 changed files with 149 additions and 74 deletions

View File

@@ -6,23 +6,38 @@ 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 {
spacing: Dimensions.l
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);
}
}
}
}