native: add note endpoint

fixes #31
This commit is contained in:
Schnitzel 2024-07-12 10:49:41 +02:00
parent 4b9c8623f8
commit 56ead89983

View file

@ -67,17 +67,17 @@ Window {
text = text.replace(/[^0-9]/g, "")
}
Keys.onReturnPressed: notizenT.focus = true
Keys.onReturnPressed: noteT.focus = true
}
TextField {
id: notizenT
id: noteT
anchors {
horizontalCenter: parent.horizontalCenter
topMargin: 5
top: amountT.bottom
}
placeholderText: qsTr("Notizen")
placeholderText: qsTr("Notes")
Keys.onReturnPressed: groupSelector.focus = true
}
@ -86,7 +86,7 @@ Window {
anchors {
horizontalCenter: parent.horizontalCenter
topMargin: 5
top: notizenT.bottom
top: noteT.bottom
}
model: groupsModel
@ -123,6 +123,7 @@ Window {
var data = JSON.stringify({
name: nameT.text,
key: keyT.text,
note: noteT.text,
amount: parseInt(amountT.text),
group_id: groupSelector.currentIndex !== -1 ? groupsModel.get(groupSelector.currentIndex).id : "",
});