1
0

Refactor success and error messages

This commit is contained in:
kolaente
2021-06-22 22:07:57 +02:00
parent ab4edc17de
commit cdc805c8da
55 changed files with 219 additions and 256 deletions

View File

@ -110,7 +110,7 @@ export default {
this.$store.dispatch('namespaces/loadNamespaces')
this.$router.push({name: 'list.index', params: {listId: r.getListId()}})
})
.catch(e => this.error(e, this))
.catch(e => this.error(e))
},
},
}

View File

@ -34,10 +34,10 @@ export default {
this.filterService.delete(filter)
.then(() => {
this.$store.dispatch('namespaces/loadNamespaces')
this.success({message: 'The filter was deleted successfully.'}, this)
this.success({message: 'The filter was deleted successfully.'})
this.$router.push({name: 'namespaces.index'})
})
.catch(e => this.error(e, this))
.catch(e => this.error(e))
},
},
}

View File

@ -110,19 +110,19 @@ export default {
this.filter = r
this.filters = objectToSnakeCase(this.filter.filters)
})
.catch(e => this.error(e, this))
.catch(e => this.error(e))
},
save() {
this.filter.filters = this.filters
this.filterService.update(this.filter)
.then(r => {
this.$store.dispatch('namespaces/loadNamespaces')
this.success({message: 'The filter was saved successfully.'}, this)
this.success({message: 'The filter was saved successfully.'})
this.filter = r
this.filters = objectToSnakeCase(this.filter.filters)
this.$router.back()
})
.catch(e => this.error(e, this))
.catch(e => this.error(e))
},
},
}