mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Finished adding the simplest form of Menus.
This commit is contained in:
parent
3290b3086a
commit
075dd57996
9 changed files with 107 additions and 12 deletions
|
|
@ -3,6 +3,9 @@ import { Lists } from "../../imports/api/lists";
|
|||
import { Locations } from "../../imports/api/location";
|
||||
import { Products } from "../../imports/api/products";
|
||||
import { Stores } from "../../imports/api/stores";
|
||||
import { Menus } from '../../imports/api/menu.js';
|
||||
import { MenuItems } from '../../imports/api/menuItems.js';
|
||||
import moment from 'moment';
|
||||
|
||||
|
||||
Template.dashboard.onCreated(function() {
|
||||
|
|
@ -12,6 +15,8 @@ Template.dashboard.onCreated(function() {
|
|||
this.subscribe("storeInfo");
|
||||
this.subscribe("myProducts");
|
||||
this.subscribe("myLocations");
|
||||
this.subscribe("myMenus");
|
||||
this.subscribe("todayMenuItems");
|
||||
});
|
||||
|
||||
Template.dashboard.onRendered(function() {
|
||||
|
|
@ -36,6 +41,14 @@ Template.dashboard.helpers({
|
|||
},
|
||||
locCount: function() {
|
||||
return Locations.find().count();
|
||||
},
|
||||
todayMenuItem: function() {
|
||||
return MenuItems.find({});
|
||||
},
|
||||
todayDate: function() {
|
||||
let now = new Date();
|
||||
let todayDate = moment(now).format("MMM D, YYYY");
|
||||
return todayDate;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -62,6 +75,9 @@ Template.dashboard.events({
|
|||
case "locationMgmtLink":
|
||||
FlowRouter.go('/manageLocation');
|
||||
break;
|
||||
case "myMenuLink":
|
||||
FlowRouter.go('/mymenus');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -89,6 +105,8 @@ Template.dashboard.events({
|
|||
case "prodInfoCard":
|
||||
FlowRouter.go("/manageProduct");
|
||||
break;
|
||||
case "menuInfoCard":
|
||||
FlowRouter.go('/mymenus');
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue