Fix deleting a saved filter

This commit is contained in:
kolaente 2020-12-19 00:19:12 +01:00
parent a2ce7e761c
commit 206f32a793
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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>