Fix deleting a saved filter
This commit is contained in:
parent
a2ce7e761c
commit
206f32a793
1 changed files with 10 additions and 1 deletions
|
@ -72,7 +72,7 @@
|
|||
|
||||
<modal
|
||||
@close="showDeleteModal = false"
|
||||
@submit="deleteList()"
|
||||
@submit="() => deleteSavedFilter()"
|
||||
v-if="showDeleteModal">
|
||||
<span slot="header">Delete this saved filter</span>
|
||||
<p slot="text">
|
||||
|
@ -152,6 +152,15 @@ export default {
|
|||
})
|
||||
.catch(e => this.error(e, this))
|
||||
},
|
||||
deleteSavedFilter() {
|
||||
this.filterService.delete(this.filter)
|
||||
.then(() => {
|
||||
this.$store.dispatch('namespaces/loadNamespaces')
|
||||
this.success({message: 'The filter was deleted successfully.'}, this)
|
||||
this.$router.push({name: 'namespaces.index'})
|
||||
})
|
||||
.catch(e => this.error(e, this))
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue