Commit f8dbcb80 authored by Angelina Filippova's avatar Angelina Filippova

Add confirmation when deleting a single user

parent 702d989c
......@@ -143,7 +143,18 @@ export default {
this.$store.dispatch('ResendConfirmationEmail', [user])
},
handleDeletion(user) {
this.$store.dispatch('DeleteUsers', { users: [user], _userId: user.id })
this.$confirm('Are you sure you want to delete this account?', 'Warning', {
confirmButtonText: 'Delete',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.$store.dispatch('DeleteUsers', { users: [user], _userId: user.id })
}).catch(() => {
this.$message({
type: 'info',
message: 'Delete canceled'
})
})
},
handleEmailConfirmation(user) {
this.$store.dispatch('ConfirmUsersEmail', { users: [user], _userId: user.id, _statusId: this.statusId })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment