Fix not updating list name in store when changing it
This commit is contained in:
parent
912cb66970
commit
9d818921a7
4 changed files with 28 additions and 25 deletions
|
|
@ -45,7 +45,7 @@ export default {
|
|||
this.listDuplicateService.create(listDuplicate)
|
||||
.then(r => {
|
||||
this.$store.commit('namespaces/addListToNamespace', r.list)
|
||||
this.$store.commit('lists/addList', r.list)
|
||||
this.$store.commit('lists/setList', r.list)
|
||||
this.success({message: 'The list was successfully duplicated.'}, this)
|
||||
this.$router.push({name: 'list.index', params: {listId: r.list.id}})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -113,9 +113,8 @@ export default {
|
|||
})
|
||||
},
|
||||
save() {
|
||||
this.listService.update(this.list)
|
||||
.then(r => {
|
||||
this.$store.commit('namespaces/setListInNamespaceById', r)
|
||||
this.$store.dispatch('lists/updateList', this.list)
|
||||
.then(() => {
|
||||
this.success({message: 'The list was successfully updated.'}, this)
|
||||
this.$router.back()
|
||||
})
|
||||
|
|
|
|||
Reference in a new issue