diff --git a/modules/client/front/consumption-search-panel/locale/es.yml b/modules/client/front/consumption-search-panel/locale/es.yml
index 8d5276194..68de42b23 100644
--- a/modules/client/front/consumption-search-panel/locale/es.yml
+++ b/modules/client/front/consumption-search-panel/locale/es.yml
@@ -1,4 +1,3 @@
-Ink: Tinta
-Origin: Origen
-Producer: Productor
-For me: Para mi
\ No newline at end of file
+Item id: Id artículo
+From: Desde
+To: Hasta
\ No newline at end of file
diff --git a/modules/client/front/consumption/index.js b/modules/client/front/consumption/index.js
index 80a44db69..4b075abb9 100644
--- a/modules/client/front/consumption/index.js
+++ b/modules/client/front/consumption/index.js
@@ -2,8 +2,11 @@ import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
- constructor($element, $) {
+ constructor($element, $, vnReport, vnEmail) {
super($element, $);
+ this.vnReport = vnReport;
+ this.vnEmail = vnEmail;
+
this.filter = {
where: {
isPackaging: false
@@ -38,15 +41,11 @@ class Controller extends Section {
}
showReport() {
- const params = this.reportParams;
- const serializedParams = this.$httpParamSerializer(params);
- window.open(`api/report/campaign-metrics?${serializedParams}`);
+ this.vnReport.show('campaign-metrics', this.reportParams);
}
sendEmail() {
- const params = this.reportParams;
- this.$http.get(`email/campaign-metrics`, {params})
- .then(() => this.vnApp.showMessage(this.$t('Notification sent!')));
+ this.vnEmail.send('campaign-metrics', this.reportParams);
}
changeGrouped(value) {
@@ -56,7 +55,7 @@ class Controller extends Section {
}
}
-Controller.$inject = ['$element', '$scope'];
+Controller.$inject = ['$element', '$scope', 'vnReport', 'vnEmail'];
ngModule.component('vnClientConsumption', {
template: require('./index.html'),
diff --git a/modules/client/front/descriptor/index.html b/modules/client/front/descriptor/index.html
index 19fcba128..aac5eb343 100644
--- a/modules/client/front/descriptor/index.html
+++ b/modules/client/front/descriptor/index.html
@@ -13,11 +13,6 @@
translate>
Send SMS
-
- View consumer report
-
@@ -94,28 +89,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/modules/client/front/descriptor/index.js b/modules/client/front/descriptor/index.js
index 7d3f628b4..89248ebed 100644
--- a/modules/client/front/descriptor/index.js
+++ b/modules/client/front/descriptor/index.js
@@ -39,14 +39,6 @@ class Controller extends Descriptor {
};
this.$.sms.open();
}
-
- onConsumerReportAccept() {
- this.vnReport.show('campaign-metrics', {
- recipientId: this.id,
- from: this.from,
- to: this.to,
- });
- }
}
ngModule.vnComponent('vnClientDescriptor', {
diff --git a/print/templates/email/campaign-metrics/locale/es.yml b/print/templates/email/campaign-metrics/locale/es.yml
index fc7aec432..d1c1182a2 100644
--- a/print/templates/email/campaign-metrics/locale/es.yml
+++ b/print/templates/email/campaign-metrics/locale/es.yml
@@ -4,5 +4,5 @@ dear: Estimado cliente
description: Tal y como nos ha solicitado nos complace
relacionarle a continuación el consumo que nos consta en su cuenta para las
fechas comprendidas entre {0} y {1}.
- Espero le sea de utilidad para preparar sus pedido.
+ Espero le sea de utilidad para preparar su pedido.
Al mismo tiempo aprovecho la ocasión para saludarle cordialmente.