Merge pull request #304 from gradido/240-Create-user-error-not-caught

error messages are displayed
This commit is contained in:
Alexander Friedland 2021-05-06 12:32:06 +02:00 committed by GitHub
commit 27a412475e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 3 deletions

View File

@ -46,6 +46,9 @@
"thx":"Danke,",
"send_success":"deine Transaktion wurde erfolgreich ausgeführt"
},
"error": {
"error":"Fehler"
},
"transaction":{
"show_all":"Alle <strong>{count}</strong> Transaktionen ansehen",
"nullTransactions":"Du hast noch keine Transaktionen auf deinem Konto.",

View File

@ -46,6 +46,9 @@
"thx":"Thank you,",
"send_success":"your transaction was successfully completed"
},
"error": {
"error":"Error"
},
"transaction":{
"show_part": "The last <strong>{count}</strong> transactions",
"nullTransactions":"You don't have any transactions on your account yet.",

View File

@ -110,6 +110,20 @@
</base-input>
</b-col>
</b-row>
<b-alert
v-if="showError"
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>
{{ messageError }}
</span>
</b-alert>
<div
class="text-center"
v-if="
@ -160,6 +174,8 @@ export default {
checkPassword: '',
passwordVisible: false,
submitted: false,
showError: false,
messageError: '',
}
},
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.showError = true
this.messageError = result.result.message
}
},
closeAlert() {
this.showError = false
this.messageError = ''
this.model.email = ''
this.model.firstname = ''
this.model.lastname = ''
this.password = ''
},
},
computed: {
samePasswords() {