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