mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Many chcanges, but version 0.1.0 is ready to be cut.
This commit is contained in:
parent
42643a37f5
commit
6e37ae8c74
46 changed files with 1038 additions and 273 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { Categories } from "../../imports/api/category";
|
||||
import { Lists } from "../../imports/api/lists";
|
||||
import { Locations } from "../../imports/api/location";
|
||||
import { Products } from "../../imports/api/products";
|
||||
import { Stores } from "../../imports/api/stores";
|
||||
|
||||
|
|
@ -10,6 +11,7 @@ Template.dashboard.onCreated(function() {
|
|||
this.subscribe("myCategories");
|
||||
this.subscribe("storeInfo");
|
||||
this.subscribe("myProducts");
|
||||
this.subscribe("myLocations");
|
||||
});
|
||||
|
||||
Template.dashboard.onRendered(function() {
|
||||
|
|
@ -31,12 +33,64 @@ Template.dashboard.helpers({
|
|||
},
|
||||
catCount: function() {
|
||||
return Categories.find().count();
|
||||
},
|
||||
locCount: function() {
|
||||
return Locations.find().count();
|
||||
}
|
||||
});
|
||||
|
||||
Template.dashboard.events({
|
||||
"click #usermgmtlink" (event) {
|
||||
"click .cardLink" (event) {
|
||||
event.preventDefault();
|
||||
FlowRouter.go('/userMgmt');
|
||||
let link = event.currentTarget.id;
|
||||
switch(link) {
|
||||
case "userMgmtLink":
|
||||
FlowRouter.go('/userMgmt');
|
||||
break;
|
||||
case "listMgmtLink":
|
||||
FlowRouter.go('/manageLists');
|
||||
break;
|
||||
case "storeMgmtLink":
|
||||
FlowRouter.go('/manageStore');
|
||||
break;
|
||||
case "prodMgmtLink":
|
||||
FlowRouter.go('/manageProduct');
|
||||
break;
|
||||
case "catMgmtLink":
|
||||
FlowRouter.go('/manageCategory');
|
||||
break;
|
||||
case "locationMgmtLink":
|
||||
FlowRouter.go('/manageLocation');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
'click .card' (event) {
|
||||
event.preventDefault();
|
||||
let cardId = event.currentTarget.id;
|
||||
|
||||
switch(cardId) {
|
||||
case "userInfoCard":
|
||||
FlowRouter.go('/userMgmt');
|
||||
break;
|
||||
case "listInfoCard":
|
||||
FlowRouter.go("/mylists");
|
||||
break;
|
||||
case "storeInfoCard":
|
||||
FlowRouter.go('/manageStore');
|
||||
break;
|
||||
case "catInfoCard":
|
||||
FlowRouter.go('/manageCategory');
|
||||
break;
|
||||
case "locInfoCard":
|
||||
FlowRouter.go('/manageLocation');
|
||||
break;
|
||||
case "prodInfoCard":
|
||||
FlowRouter.go("/manageProduct");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue