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", "time":"Zeit",
"send_now":"Jetzt versenden", "send_now":"Jetzt versenden",
"scann_code":"<strong>QR Code Scanner</strong> - Scanne den QR Code deines Partners", "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!", "send_check":"Bestätige deine Zahlung. Prüfe bitte nochmal alle Daten!",
"thx":"Danke,", "thx":"Danke",
"send_success":"deine Transaktion wurde erfolgreich ausgeführt" "sorry":"Entschuldigung",
"send_transaction_success":"Deine Transaktion wurde erfolgreich ausgeführt",
"send_transaction_error":"Leider konnte die Transaktion nicht ausgeführt werden!"
}, },
"error": { "error": {
"error":"Fehler" "error":"Fehler"

View File

@ -19,7 +19,7 @@
"en": "English" "en": "English"
}, },
"form": { "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", "cancel":"Cancel",
"reset": "Reset", "reset": "Reset",
"close":"Close", "close":"Close",
@ -40,11 +40,13 @@
"at":"at", "at":"at",
"time":"Time", "time":"Time",
"send_now":"Send now", "send_now":"Send now",
"scann_code":"<strong>QR Code Scanner</strong> - Scanne den QR Code deines Partners", "scann_code":"<strong>QR Code Scanner</strong> - Scan the QR Code of your partner",
"max_gdd_info":"maximale anzahl GDD zum versenden erreicht!", "max_gdd_info":"Maximum number of GDDs to be sent has been reached!",
"send_check":"Bestätige deine Zahlung. Prüfe bitte nochmal alle Daten!", "send_check":"Confirm your payment. Please check all data again!",
"thx":"Thank you,", "thx":"Thank you",
"send_success":"your transaction was successfully completed" "sorry":"Sorry",
"send_transaction_success":"Your transaction was successfully completed",
"send_transaction_error":"Unfortunately, the transaction could not be executed!"
}, },
"error": { "error": {
"error":"Error" "error":"Error"

View File

@ -179,13 +179,31 @@
</b-row> </b-row>
<b-row v-show="row_thx"> <b-row v-show="row_thx">
<b-col> <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') }} {{ $t('form.thx') }}
<hr /> <hr />
{{ $t('form.send_success') }} {{ $t('form.send_transaction_success') }}
</div> </div>
<p class="text-center">
<b-button variant="success" @click="onReset">{{ $t('form.close') }}</b-button> <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-col>
</b-row> </b-row>
</div> </div>
@ -226,7 +244,8 @@ export default {
}, },
send: false, send: false,
row_check: false, row_check: false,
row_thx: false, row_thx: true,
row_error: false,
} }
}, },
computed: {}, computed: {},
@ -250,6 +269,7 @@ export default {
this.$emit('toggle-show-list', false) this.$emit('toggle-show-list', false)
this.row_check = true this.row_check = true
this.row_thx = false this.row_thx = false
this.row_error = false
}, },
async sendTransaction() { async sendTransaction() {
const result = await communityAPI.send( const result = await communityAPI.send(
@ -263,12 +283,13 @@ export default {
this.$emit('toggle-show-list', false) this.$emit('toggle-show-list', false)
this.row_check = false this.row_check = false
this.row_thx = true this.row_thx = true
this.row_error = false
this.$emit('update-balance', { ammount: this.ajaxCreateData.amount }) this.$emit('update-balance', { ammount: this.ajaxCreateData.amount })
} else { } else {
alert('error')
this.$emit('toggle-show-list', true) this.$emit('toggle-show-list', true)
this.row_check = false this.row_check = false
this.row_thx = false this.row_thx = false
this.row_error = true
} }
}, },
onReset(event) { onReset(event) {
@ -280,6 +301,7 @@ export default {
this.$emit('toggle-show-list', true) this.$emit('toggle-show-list', true)
this.row_check = false this.row_check = false
this.row_thx = false this.row_thx = false
this.row_error = false
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
}) })