v1.7 alpha.4

This commit is contained in:
carodej
2020-07-15 11:50:32 +02:00
parent 25d15390ef
commit 6b36480097
15 changed files with 222 additions and 209 deletions

View File

@@ -80,27 +80,36 @@
}
}
)
.then(() => {
this.isSendingRequest = false
.then((response) => {
// Show error message
events.$emit('success:open', {
emoji: '👍',
title: this.$t('popup_deleted_user.title'),
message: this.$t('popup_deleted_user.message'),
})
if (response.status === 202) {
events.$emit('alert:open', {
emoji: '☹️',
title: this.$t('popup_deleted_user_aborted.title'),
message: this.$t('popup_deleted_user_aborted.message'),
})
}
this.$router.push({name: 'Users'})
if (response.status === 200) {
events.$emit('success:open', {
emoji: '👍',
title: this.$t('popup_deleted_user.title'),
message: this.$t('popup_deleted_user.message'),
})
this.$router.push({name: 'Users'})
}
})
.catch(() => {
this.isSendingRequest = false
events.$emit('alert:open', {
title: this.$t('popup_error.title'),
message: this.$t('popup_error.message'),
})
})
.finally(() => {
this.isSendingRequest = false
})
}
},
}