Item Add: Navigate to the new Item once added (#3010)
Currently, if you go to Settings -> Items -> Add -> Save, you'll be brought back to the Items list (back navigation). This PR changes this behavior so that after the new item is saved/added, the user is redirected to the Item Details page **of that new item**, so they can immediately work on it. Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>main
parent
3e010ec300
commit
7dd7f31cdd
|
@ -217,7 +217,11 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dirty = false
|
this.dirty = false
|
||||||
|
if (this.createMode) {
|
||||||
|
this.$f7router.navigate('/settings/items/' + this.item.name)
|
||||||
|
} else {
|
||||||
this.$f7router.back()
|
this.$f7router.back()
|
||||||
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.$f7.toast.create({
|
this.$f7.toast.create({
|
||||||
text: 'Item not saved: ' + err,
|
text: 'Item not saved: ' + err,
|
||||||
|
|
Loading…
Reference in New Issue