Add confirmation when deleting a single user

This commit is contained in:
Angelina Filippova 2020-07-17 13:45:39 +03:00
parent 702d989c08
commit f8dbcb80ab

View file

@ -143,7 +143,18 @@ export default {
this.$store.dispatch('ResendConfirmationEmail', [user])
},
handleDeletion(user) {
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 })