mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 08:18:50 +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({
|
Template.menuItemsTbl.helpers({
|
||||||
thisMenuItems: function() {
|
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.');
|
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({
|
return MenuItems.insert({
|
||||||
itemName: itemName,
|
itemName: itemName,
|
||||||
serveDate: serveDate,
|
serveDate: serveDate,
|
||||||
|
serveDateActual: serveDateActual,
|
||||||
menuId: menuId,
|
menuId: menuId,
|
||||||
addedBy: this.userId,
|
addedBy: this.userId,
|
||||||
itemMade: false,
|
itemMade: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue