mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
42 lines
No EOL
1 KiB
JavaScript
42 lines
No EOL
1 KiB
JavaScript
import { Categories } from "../../imports/api/category";
|
|
import { Lists } from "../../imports/api/lists";
|
|
import { Products } from "../../imports/api/products";
|
|
import { Stores } from "../../imports/api/stores";
|
|
|
|
|
|
Template.dashboard.onCreated(function() {
|
|
this.subscribe("userList");
|
|
this.subscribe("myLists");
|
|
this.subscribe("myCategories");
|
|
this.subscribe("storeInfo");
|
|
this.subscribe("myProducts");
|
|
});
|
|
|
|
Template.dashboard.onRendered(function() {
|
|
|
|
});
|
|
|
|
Template.dashboard.helpers({
|
|
userCount: function() {
|
|
return Meteor.users.find().count();
|
|
},
|
|
listCount: function() {
|
|
return Lists.find().count();
|
|
},
|
|
storeCount: function() {
|
|
return Stores.find().count();
|
|
},
|
|
productCount: function() {
|
|
return Products.find().count();
|
|
},
|
|
catCount: function() {
|
|
return Categories.find().count();
|
|
}
|
|
});
|
|
|
|
Template.dashboard.events({
|
|
"click #usermgmtlink" (event) {
|
|
event.preventDefault();
|
|
FlowRouter.go('/userMgmt');
|
|
},
|
|
}); |