- admin registration fixes

- alert popup refactoring
This commit is contained in:
Čarodej
2022-03-17 12:31:09 +01:00
parent e8f59ef0a9
commit 01588fa06b
41 changed files with 288 additions and 300 deletions

View File

@@ -201,7 +201,13 @@ export default {
})
.catch((error) => {
// Validation errors
if (error.response.status == 422) {
if (error.response.status === 409) {
events.$emit('alert:open', {
title: error.response.data.message,
})
} else if (error.response.status === 422) {
// Email validation error
if (error.response.data.errors['email']) {
this.$refs.createUser.setErrors({