From f4e0d04b6425d6f90c03464dba8a038903665bae Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 27 Nov 2019 16:16:22 +0100 Subject: [PATCH] =?UTF-8?q?#1903=20informe=20consumo=20campa=C3=B1a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- print/core/filters/date.js | 1 - .../reports/campaign-metrics/campaign-metrics.js | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/print/core/filters/date.js b/print/core/filters/date.js index 5762905e2..37b9dd16f 100644 --- a/print/core/filters/date.js +++ b/print/core/filters/date.js @@ -2,6 +2,5 @@ const Vue = require('vue'); const strftime = require('strftime'); Vue.filter('date', function(value, specifiers) { - console.log(value); return strftime(specifiers, value); }); diff --git a/print/templates/reports/campaign-metrics/campaign-metrics.js b/print/templates/reports/campaign-metrics/campaign-metrics.js index dc8822faa..d4d613a61 100755 --- a/print/templates/reports/campaign-metrics/campaign-metrics.js +++ b/print/templates/reports/campaign-metrics/campaign-metrics.js @@ -6,9 +6,18 @@ const reportFooter = new Component('report-footer'); module.exports = { name: 'campaign-metrics', async serverPrefetch() { + // // te delete once form inputs get date ranges + this.from = new Date(); + this.from.setMonth(0); + this.from.setDate(1); + this.to = new Date(); + this.to.setMonth(11); + this.to.setDate(31); + // this.clientId = 101; + // // end of delete + this.client = await this.fetchClient(this.clientId); - console.log(this.from, this.to); this.sales = await this.fetchSales(this.clientId, this.from, this.to); if (!this.client)