mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Adding more methods and views, updated dashboards a bit. Still not ready
This commit is contained in:
parent
266dbd0856
commit
42643a37f5
23 changed files with 374 additions and 32 deletions
|
|
@ -1,7 +1,15 @@
|
|||
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() {
|
||||
|
|
@ -11,6 +19,18 @@ 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();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue