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
|
<modal
|
||||||
@close="showDeleteModal = false"
|
@close="showDeleteModal = false"
|
||||||
@submit="deleteList()"
|
@submit="() => deleteSavedFilter()"
|
||||||
v-if="showDeleteModal">
|
v-if="showDeleteModal">
|
||||||
<span slot="header">Delete this saved filter</span>
|
<span slot="header">Delete this saved filter</span>
|
||||||
<p slot="text">
|
<p slot="text">
|
||||||
|
@ -152,6 +152,15 @@ export default {
|
||||||
})
|
})
|
||||||
.catch(e => this.error(e, this))
|
.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>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue