#1903 informe consumo campaña
gitea/salix/1772-campaign_metrics This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2019-11-27 16:16:22 +01:00
parent ee92ec42f7
commit f4e0d04b64
2 changed files with 10 additions and 2 deletions

View File

@ -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);
});

View File

@ -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)