error messages are displayed

This commit is contained in:
ogerly 2021-05-05 08:57:14 +02:00
parent 1dad6dff06
commit 3bff6c1d6f
3 changed files with 32 additions and 3 deletions

View File

@ -45,6 +45,9 @@
"thx":"Danke!",
"send_success":"Deine Zahlung wurde erfolgreich versendet."
},
"error": {
"error":"Fehler"
},
"transaction":{
"show_part": "Die letzten <strong>{count}</strong> Transaktionen",
"show_all":"Alle <strong>{count}</strong> Transaktionen ansehen",

View File

@ -45,6 +45,9 @@
"thx":"THX",
"send_success":"Deine Zahlung wurde erfolgreich versendet."
},
"error": {
"error":"Error"
},
"transaction":{
"show_part": "The last <strong>{count}</strong> transactions",
"show_all":"View all <strong>{count}</strong> transactions",

View File

@ -110,6 +110,20 @@
</base-input>
</b-col>
</b-row>
<b-alert
v-if="registerfail"
show
dismissible
variant="warning"
@dismissed="closeAlert"
>
<span class="alert-icon"><i class="ni ni-point"></i></span>
<span class="alert-text">
<strong>{{ $t('error.error') }}!</strong>
{{ registererror }}
</span>
</b-alert>
<div
class="text-center"
v-if="
@ -160,6 +174,8 @@ export default {
checkPassword: '',
passwordVisible: false,
submitted: false,
registerfail: false,
registererror: '',
}
},
methods: {
@ -184,11 +200,18 @@ export default {
this.password = ''
this.$router.push('/thx')
} else {
// todo: Display a proper error message!
this.$store.dispatch('logout')
this.$router.push('/login')
this.registerfail = true
this.registererror = result.result.message
}
},
closeAlert() {
this.registerfail = false
this.registererror = ''
this.model.email = ''
this.model.firstname = ''
this.model.lastname = ''
this.password = ''
},
},
computed: {
samePasswords() {