mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Fixing the menu items to sort by date.
This commit is contained in:
parent
2d9ab70fa6
commit
301c66eeba
2 changed files with 3 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ Template.menuItemsTbl.onRendered(function() {
|
|||
|
||||
Template.menuItemsTbl.helpers({
|
||||
thisMenuItems: function() {
|
||||
return MenuItems.find({});
|
||||
return MenuItems.find({}, { sort: { serveDateActual: 1 }});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to add items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
serveDateActual = new Date(serveDate);
|
||||
|
||||
return MenuItems.insert({
|
||||
itemName: itemName,
|
||||
serveDate: serveDate,
|
||||
serveDateActual: serveDateActual,
|
||||
menuId: menuId,
|
||||
addedBy: this.userId,
|
||||
itemMade: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue