Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

Commit

Permalink
fix(proposals): redirect to draft as soon as it's saved
Browse files Browse the repository at this point in the history
  • Loading branch information
vhf committed Dec 9, 2019
1 parent ee85054 commit 4dc1a62
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pages/proposal/class.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ export default {
...classGetters(['success', 'error'])
},
watch: {
id () {
if (typeof this.id === 'number') {
this.$router.push({
name: 'proposal-class',
query: { id: this.id }
})
}
},
success () {
if (!this.error && this.success) {
this.$store.dispatch('drafts/LOAD')
Expand Down
8 changes: 8 additions & 0 deletions pages/proposal/property.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ export default {
...propertyGetters(['success', 'error'])
},
watch: {
id () {
if (typeof this.id === 'number') {
this.$router.push({
name: 'proposal-property',
query: { id: this.id }
})
}
},
success () {
if (!this.error && this.success) {
this.$store.dispatch('drafts/LOAD')
Expand Down

0 comments on commit 4dc1a62

Please sign in to comment.