brmbar v3 ItemEdit: Support for saving changes and restocking

This commit is contained in:
Petr Baudis 2012-09-28 22:37:37 +02:00
parent 6e7cdf0bad
commit 34bfac01d5
3 changed files with 24 additions and 5 deletions

View file

@ -299,8 +299,12 @@ Item {
text: "Save"
onButtonClick: {
info["name"] = name
shop.saveAccount(dbid, info)
status_text.setStatus("Changes saved", "#ffff7c")
var res = shop.saveItem(dbid, info)
if (res.cost) {
status_text.setStatus("Restocked! Take " + res.cost + " from the money box.", "#ffff7c")
} else {
status_text.setStatus("Changes saved", "#ffff7c")
}
loadPage("StockMgmt")
}
}