From b6de50848a634d78ff8bf0208b78a7f44406726f Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 12 Jan 2023 11:48:44 +0100 Subject: [PATCH 1/3] refs #5081 fix sms faltas --- front/salix/components/sendSms/locale/es.yml | 2 +- modules/route/front/sms/index.js | 2 +- modules/ticket/front/sale/index.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/front/salix/components/sendSms/locale/es.yml b/front/salix/components/sendSms/locale/es.yml index 64c3fcca6..94ab8e588 100644 --- a/front/salix/components/sendSms/locale/es.yml +++ b/front/salix/components/sendSms/locale/es.yml @@ -1,7 +1,7 @@ Send SMS: Enviar SMS Destination: Destinatario Message: Mensaje -SMS sent!: ¡SMS enviado! +SMS sent: ¡SMS enviado! Characters remaining: Carácteres restantes The destination can't be empty: El destinatario no puede estar vacio The message can't be empty: El mensaje no puede estar vacio diff --git a/modules/route/front/sms/index.js b/modules/route/front/sms/index.js index d8b1fc134..f466adea7 100644 --- a/modules/route/front/sms/index.js +++ b/modules/route/front/sms/index.js @@ -26,7 +26,7 @@ class Controller extends Component { throw new Error(`The message it's too long`); this.$http.post(`Routes/sendSms`, this.sms).then(res => { - this.vnApp.showMessage(this.$t('SMS sent!')); + this.vnApp.showMessage(this.$t('SMS sent')); if (res.data) this.emit('send', {response: res.data}); }); diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index c624b1a95..bb52089b3 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -441,10 +441,10 @@ - - + Date: Thu, 12 Jan 2023 11:57:20 +0100 Subject: [PATCH 2/3] front test expected old value --- modules/route/front/sms/index.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/route/front/sms/index.spec.js b/modules/route/front/sms/index.spec.js index 42bf30931..8bf35e673 100644 --- a/modules/route/front/sms/index.spec.js +++ b/modules/route/front/sms/index.spec.js @@ -30,7 +30,7 @@ describe('Route', () => { controller.onResponse(); $httpBackend.flush(); - expect(controller.vnApp.showMessage).toHaveBeenCalledWith('SMS sent!'); + expect(controller.vnApp.showMessage).toHaveBeenCalledWith('SMS sent'); }); it('should call onResponse without the destination and show an error snackbar', () => { -- 2.40.1 From d5a7691b9c16816072f9fbc23d4a583b668b5a96 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Thu, 12 Jan 2023 12:56:51 +0100 Subject: [PATCH 3/3] add controller function --- modules/ticket/front/sale/index.html | 3 ++- modules/ticket/front/sale/index.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/ticket/front/sale/index.html b/modules/ticket/front/sale/index.html index bb52089b3..d65a83c58 100644 --- a/modules/ticket/front/sale/index.html +++ b/modules/ticket/front/sale/index.html @@ -443,7 +443,8 @@ + sms="$ctrl.newSMS" + on-send="$ctrl.onSmsSend($sms)"> this.vnApp.showSuccess(this.$t('SMS sent'))); + } + /** * Inserts a new instance */ -- 2.40.1