forked from brmlab/brmbar-github
brmbar v3 ItemEdit: Support for saving changes and restocking
This commit is contained in:
parent
6e7cdf0bad
commit
34bfac01d5
3 changed files with 24 additions and 5 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue