Removed report from descriptor
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ed83fd5f73
commit
279677bda9
|
@ -1,4 +1,3 @@
|
|||
Ink: Tinta
|
||||
Origin: Origen
|
||||
Producer: Productor
|
||||
For me: Para mi
|
||||
Item id: Id artículo
|
||||
From: Desde
|
||||
To: Hasta
|
|
@ -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'),
|
||||
|
|
|
@ -13,11 +13,6 @@
|
|||
translate>
|
||||
Send SMS
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="consumerReportDialog.show()"
|
||||
translate>
|
||||
View consumer report
|
||||
</vn-item>
|
||||
</slot-menu>
|
||||
<slot-body>
|
||||
<div class="attributes">
|
||||
|
@ -94,28 +89,4 @@
|
|||
<vn-client-sms
|
||||
vn-id="sms"
|
||||
sms="$ctrl.newSMS">
|
||||
</vn-client-sms>
|
||||
<vn-dialog
|
||||
vn-id="consumerReportDialog"
|
||||
on-accept="$ctrl.onConsumerReportAccept()"
|
||||
message="Send consumer report">
|
||||
<tpl-body>
|
||||
<vn-date-picker
|
||||
vn-id="from"
|
||||
vn-one
|
||||
ng-model="$ctrl.from"
|
||||
label="From date"
|
||||
vn-focus>
|
||||
</vn-date-picker>
|
||||
<vn-date-picker
|
||||
vn-id="to"
|
||||
vn-one
|
||||
ng-model="$ctrl.to"
|
||||
label="To date">
|
||||
</vn-date-picker>
|
||||
</tpl-body>
|
||||
<tpl-buttons>
|
||||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
||||
<button response="accept" translate>Accept</button>
|
||||
</tpl-buttons>
|
||||
</vn-dialog>
|
||||
</vn-client-sms>
|
|
@ -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', {
|
||||
|
|
|
@ -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 <strong>{0}</strong> y <strong>{1}</strong>.
|
||||
Espero le sea de utilidad para preparar sus pedido.<br/><br/>
|
||||
Espero le sea de utilidad para preparar su pedido.<br/><br/>
|
||||
Al mismo tiempo aprovecho la ocasión para saludarle cordialmente.
|
||||
|
|
Loading…
Reference in New Issue