From 986f40cf5369563d8d2430db53ac4a29cd38d470 Mon Sep 17 00:00:00 2001 From: ogerly Date: Tue, 11 May 2021 07:24:59 +0200 Subject: [PATCH] transaction error message, translations --- frontend/src/locales/de.json | 8 ++-- frontend/src/locales/en.json | 14 ++++--- .../views/Pages/AccountOverview/GddSend.vue | 38 +++++++++++++++---- 3 files changed, 43 insertions(+), 17 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 36d761eb0..97b751019 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -41,10 +41,12 @@ "time":"Zeit", "send_now":"Jetzt versenden", "scann_code":"QR Code Scanner - 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" diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 921074fbb..f3a4a1dfb 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -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":"QR Code Scanner - 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":"QR Code Scanner - 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" diff --git a/frontend/src/views/Pages/AccountOverview/GddSend.vue b/frontend/src/views/Pages/AccountOverview/GddSend.vue index 648216ab8..9053d0ea4 100644 --- a/frontend/src/views/Pages/AccountOverview/GddSend.vue +++ b/frontend/src/views/Pages/AccountOverview/GddSend.vue @@ -179,13 +179,31 @@ -
- {{ $t('form.thx') }} -
- {{ $t('form.send_success') }} -
+ +
+ {{ $t('form.thx') }} +
+ {{ $t('form.send_transaction_success') }} +
- {{ $t('form.close') }} +

+ {{ $t('form.close') }} +

+
+
+
+ + + +
+ {{ $t('form.sorry') }} +
+ {{ $t('form.send_transaction_error') }} +
+

+ {{ $t('form.close') }} +

+
@@ -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 })