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
jimtng 2025-01-20 04:04:45 +10:00 committed by GitHub
parent 3e010ec300
commit 7dd7f31cdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -217,7 +217,11 @@ export default {
}
this.dirty = false
this.$f7router.back()
if (this.createMode) {
this.$f7router.navigate('/settings/items/' + this.item.name)
} else {
this.$f7router.back()
}
}).catch((err) => {
this.$f7.toast.create({
text: 'Item not saved: ' + err,