Are you sure you want to delete this namespace and all of its contents?
+ This includes lists & tasks and CANNOT BE UNDONE!
+
@@ -54,6 +63,7 @@
namespace: {title: '', description:''},
error: '',
loading: false,
+ showDeleteModal: false,
}
},
beforeMount() {
@@ -101,11 +111,6 @@
})
},
deleteNamespace() {
- // TODO: add better looking modal to ask the user if he is sure
- if (!confirm('Are you sure you want to delete this namespace and all of its contents? This includes lists & tasks and CANNOT BE UNDONE!')) {
- return
- }
-
HTTP.delete(`namespaces/` + this.$route.params.id, {headers: {'Authorization': 'Bearer ' + localStorage.getItem('token')}})
.then(() => {
this.handleSuccess({message: 'The namespace was successfully deleted.'})