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
|
|
@ -8,6 +8,7 @@ import { Lists } from '../imports/api/lists.js';
|
|||
import { ListItems } from '../imports/api/listItems.js';
|
||||
import { Menus } from '../imports/api/menu.js';
|
||||
import { MenuItems } from '../imports/api/menuItems.js';
|
||||
import moment from 'moment';
|
||||
|
||||
Meteor.publish("SystemConfig", function() {
|
||||
try {
|
||||
|
|
@ -84,4 +85,14 @@ Meteor.publish("myMenuItems", function(menuId) {
|
|||
} catch (error) {
|
||||
console.log(" ERROR pulling list items for this list: " + error);
|
||||
}
|
||||
});
|
||||
|
||||
Meteor.publish("todayMenuItems", function() {
|
||||
try {
|
||||
let todayDate = new Date();
|
||||
let todaysDate = moment(todayDate).format("MMM D, YYYY");
|
||||
return MenuItems.find({ serveDate: todaysDate });
|
||||
} catch (error) {
|
||||
console.log(" ERROR pulling today's menu items: " + error);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue