Merge pull request #388 from gradido/107-Show-error-when-an-transaction-fails

transaction error message, translations
This commit is contained in:
Alexander Friedland 2021-05-11 13:28:08 +02:00 committed by GitHub
commit d766ac96b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 43 additions and 17 deletions

View File

@ -41,10 +41,12 @@
"time":"Zeit",
"send_now":"Jetzt versenden",
"scann_code":"<strong>QR Code Scanner</strong> - Scanne den QR Code deines Partners",
"max_gdd_info":"maximale anzahl GDD zum versenden erreicht!",
"max_gdd_info":"Maximale anzahl GDD zum versenden erreicht!",
"send_check":"Bestätige deine Zahlung. Prüfe bitte nochmal alle Daten!",
"thx":"Danke,",
"send_success":"deine Transaktion wurde erfolgreich ausgeführt"
"thx":"Danke",
"sorry":"Entschuldigung",
"send_transaction_success":"Deine Transaktion wurde erfolgreich ausgeführt",
"send_transaction_error":"Leider konnte die Transaktion nicht ausgeführt werden!"
},
"error": {
"error":"Fehler"

View File

@ -19,7 +19,7 @@
"en": "English"
},
"form": {
"attention": "Achtung! Bitte überprüfe alle deine Eingaben sehr genau. Du bist alleine Verantwortlich für deine Entscheidungen. Versendete Gradidos können nicht wieder zurück geholt werden.",
"attention": "Attention! Please check all your entries very carefully. You are solely responsible for your decisions. Sent Gradidos cannot be retrieved.",
"cancel":"Cancel",
"reset": "Reset",
"close":"Close",
@ -40,11 +40,13 @@
"at":"at",
"time":"Time",
"send_now":"Send now",
"scann_code":"<strong>QR Code Scanner</strong> - Scanne den QR Code deines Partners",
"max_gdd_info":"maximale anzahl GDD zum versenden erreicht!",
"send_check":"Bestätige deine Zahlung. Prüfe bitte nochmal alle Daten!",
"thx":"Thank you,",
"send_success":"your transaction was successfully completed"
"scann_code":"<strong>QR Code Scanner</strong> - Scan the QR Code of your partner",
"max_gdd_info":"Maximum number of GDDs to be sent has been reached!",
"send_check":"Confirm your payment. Please check all data again!",
"thx":"Thank you",
"sorry":"Sorry",
"send_transaction_success":"Your transaction was successfully completed",
"send_transaction_error":"Unfortunately, the transaction could not be executed!"
},
"error": {
"error":"Error"

View File

@ -179,13 +179,31 @@
</b-row>
<b-row v-show="row_thx">
<b-col>
<div class="display-1 p-4">
<b-card class="p-0 p-md-3" style="background-color: #ebebeba3 !important">
<div class="display-2 p-4">
{{ $t('form.thx') }}
<hr />
{{ $t('form.send_success') }}
{{ $t('form.send_transaction_success') }}
</div>
<p class="text-center">
<b-button variant="success" @click="onReset">{{ $t('form.close') }}</b-button>
</p>
</b-card>
</b-col>
</b-row>
<b-row v-show="row_error">
<b-col>
<b-card class="p-0 p-md-3" style="background-color: #ebebeba3 !important">
<div class="display-2 p-4">
{{ $t('form.sorry') }}
<hr />
{{ $t('form.send_transaction_error') }}
</div>
<p class="text-center">
<b-button variant="success" @click="onReset">{{ $t('form.close') }}</b-button>
</p>
</b-card>
</b-col>
</b-row>
</div>
@ -226,7 +244,8 @@ export default {
},
send: false,
row_check: false,
row_thx: false,
row_thx: true,
row_error: false,
}
},
computed: {},
@ -250,6 +269,7 @@ export default {
this.$emit('toggle-show-list', false)
this.row_check = true
this.row_thx = false
this.row_error = false
},
async sendTransaction() {
const result = await communityAPI.send(
@ -263,12 +283,13 @@ export default {
this.$emit('toggle-show-list', false)
this.row_check = false
this.row_thx = true
this.row_error = false
this.$emit('update-balance', { ammount: this.ajaxCreateData.amount })
} else {
alert('error')
this.$emit('toggle-show-list', true)
this.row_check = false
this.row_thx = false
this.row_error = true
}
},
onReset(event) {
@ -280,6 +301,7 @@ export default {
this.$emit('toggle-show-list', true)
this.row_check = false
this.row_thx = false
this.row_error = false
this.$nextTick(() => {
this.show = true
})