mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Fixing Tasks to work differently, adding to dash.
This commit is contained in:
parent
56b27d6b05
commit
2d9ab70fa6
5 changed files with 56 additions and 16 deletions
|
|
@ -6,6 +6,7 @@ import { Stores } from "../../imports/api/stores";
|
|||
import { Menus } from '../../imports/api/menu.js';
|
||||
import { MenuItems } from '../../imports/api/menuItems.js';
|
||||
import moment from 'moment';
|
||||
import { TaskItems } from "../../imports/api/tasks";
|
||||
|
||||
|
||||
Template.dashboard.onCreated(function() {
|
||||
|
|
@ -17,6 +18,7 @@ Template.dashboard.onCreated(function() {
|
|||
this.subscribe("myLocations");
|
||||
this.subscribe("myMenus");
|
||||
this.subscribe("todayMenuItems");
|
||||
this.subscribe("myTasks");
|
||||
});
|
||||
|
||||
Template.dashboard.onRendered(function() {
|
||||
|
|
@ -42,6 +44,10 @@ Template.dashboard.helpers({
|
|||
locCount: function() {
|
||||
return Locations.find().count();
|
||||
},
|
||||
mytaskitems: function() {
|
||||
let today = moment(new Date()).format("MMM DD, YYYY");
|
||||
return TaskItems.find({ isComplete: false, taskDate: today });
|
||||
},
|
||||
todayMenuItem: function() {
|
||||
return MenuItems.find({});
|
||||
},
|
||||
|
|
@ -78,6 +84,9 @@ Template.dashboard.events({
|
|||
case "myMenuLink":
|
||||
FlowRouter.go('/mymenus');
|
||||
break;
|
||||
case "taskMgmtLink":
|
||||
FlowRouter.go('/taskHome');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -107,6 +116,10 @@ Template.dashboard.events({
|
|||
break;
|
||||
case "menuInfoCard":
|
||||
FlowRouter.go('/mymenus');
|
||||
break;
|
||||
case "taskInfoCard":
|
||||
FlowRouter.go('/myTasks');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue