From 5d69f50ac0680d30b581935015871ac840574525 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Wed, 8 Jan 2020 13:27:43 +0100 Subject: [PATCH] vnZoneDeliveryDays hotfixes --- front/core/components/data-viewer/locale/es.yml | 1 + modules/agency/front/delivery-days/index.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 front/core/components/data-viewer/locale/es.yml diff --git a/front/core/components/data-viewer/locale/es.yml b/front/core/components/data-viewer/locale/es.yml new file mode 100644 index 000000000..0368321f2 --- /dev/null +++ b/front/core/components/data-viewer/locale/es.yml @@ -0,0 +1 @@ +No service for the specified zone: No hay servicio para la zona especificada \ No newline at end of file diff --git a/modules/agency/front/delivery-days/index.js b/modules/agency/front/delivery-days/index.js index e9c885a13..0d7baeb60 100644 --- a/modules/agency/front/delivery-days/index.js +++ b/modules/agency/front/delivery-days/index.js @@ -8,8 +8,14 @@ class Controller extends Section { } onSubmit() { + this.$.data = null; this.$http.get(`Zones/getEvents`, {params: this.$.params}) - .then(res => this.$.data = res.data); + .then(res => { + let data = res.data; + this.$.data = data; + if (!data.events.length) + this.vnApp.showMessage(this.$t('No service for the specified zone')); + }); } }