New employee to object as combobox

This commit is contained in:
2025-01-17 11:06:07 +01:00
parent e94a9f9900
commit 705bffc8d3
2 changed files with 5 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ ApplicationWindow
text: qsTr("Eingesetzter Mitarbeiter")
Layout.alignment: Qt.AlignRight
}
TextField
ComboBox
{
id: assignee
Layout.fillWidth: true
@@ -103,10 +103,10 @@ ApplicationWindow
text: qsTr("Hinzufügen")
onClicked:
{
if (assignee.text.trim() !== "" && duration.text.trim() !== "" && wage.text.trim() !== "" && cleanDays.text.trim() !== "" && tasks.text.trim() !== "" && output.text.trim() !== "")
if (duration.text.trim() !== "" && wage.text.trim() !== "" && cleanDays.text.trim() !== "" && tasks.text.trim() !== "" && output.text.trim() !== "")
{
var ne = {
"assignee": assignee.text.trim(),
"assignee": assignee.currentText,
"duration": duration.text.trim(),
"wage": wage.text.trim(),
"cleandays": cleanDays.text.trim(),

View File

@@ -18,7 +18,8 @@ GridLayout
Layout.fillWidth: true
editable: false
model: [qsTr("Herr"), qsTr("Frau")]
onCurrentTextChanged: briefAnrede.text = title.currentText === "Herr"? "Sehr geehrter " + title.currentText + ",": "Sehr geehrte " + title.currentText + ","
onCurrentTextChanged: briefAnrede.text = title.currentText === "Herr"? "Sehr geehrter " +
title.currentText: "Sehr geehrte " + title.currentText
}
Label
{