Added a reports page with a set of links to download CSV reports.
This commit is contained in:
54
imports/ui/Reports.js
Normal file
54
imports/ui/Reports.js
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
import './Reports.html';
|
||||
|
||||
let PREFIX = "reports.";
|
||||
|
||||
//let SalesTotals = new Meteor.Collection("salesTotals");
|
||||
//
|
||||
//Meteor.subscribe("venues");
|
||||
//Meteor.subscribe("productTags");
|
||||
|
||||
let salesTotalsSubscription;
|
||||
|
||||
|
||||
Template.Reports.onCreated(function() {
|
||||
//let template = Template.instance();
|
||||
|
||||
//Tracker.autorun(function() {
|
||||
// salesTotalsSubscription = template.subscribe("salesTotals", Session.get(PREFIX + "time"), Session.get(PREFIX + "options"));
|
||||
//});
|
||||
});
|
||||
Template.Reports.onRendered(function() {
|
||||
//Template.instance()
|
||||
//Tracker.autorun(function() {
|
||||
// if(salesTotalsSubscription.ready()) {
|
||||
//
|
||||
// }
|
||||
//});
|
||||
});
|
||||
//Template.Reports.helpers({
|
||||
// sales: function() {
|
||||
// let sort = [];
|
||||
//
|
||||
// sort.push(['year', 'asc']);// year = 1;
|
||||
// if(Session.get(PREFIX + "time") === 'weekly') sort.push(['week', 'asc']); // .week = 1;
|
||||
// if(Session.get(PREFIX + "time") === 'monthly') sort.push(['month', 'asc']); // .month = 1;
|
||||
// if(Session.get(PREFIX + "options") === 'markets') sort.push(['venue', 'asc']); // .month = 1;
|
||||
//
|
||||
// return SalesTotals.find({}, {sort: sort});
|
||||
// },
|
||||
// showTime: function(time) {
|
||||
// return Session.get(PREFIX + "time") === time;
|
||||
// },
|
||||
// showOption: function(option) {
|
||||
// return Session.get(PREFIX + "options") === option;
|
||||
// },
|
||||
// formatTotal: function(total) {
|
||||
// return "$" + total.toFixed(2);
|
||||
// }
|
||||
//});
|
||||
//Template.Reports.events({
|
||||
// 'click annualNumbers': function(event, template) {
|
||||
//
|
||||
// }
|
||||
//});
|
||||
Reference in New Issue
Block a user