mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Aded Task cleanup by number of weeks or months
This commit is contained in:
parent
e60c32894c
commit
98bcbcd256
6 changed files with 93 additions and 23 deletions
|
|
@ -94,7 +94,6 @@ Meteor.methods({
|
|||
let srvDate = moment(items[j].serveDateActual);
|
||||
let today = moment();
|
||||
let expired = moment(today).isAfter(srvDate);
|
||||
// console.log("Expired: " + expired);
|
||||
if (expired != true) {
|
||||
removeMenu = false;
|
||||
}
|
||||
|
|
@ -108,16 +107,12 @@ Meteor.methods({
|
|||
|
||||
// next let's add the ids of any menus that are marked complete
|
||||
let markedComplete = Menus.find({ menuComplete: true }).fetch();
|
||||
// console.log("---- ---- ----");
|
||||
// console.dir(markedComplete);
|
||||
for (k = 0; k < markedComplete.length; k++) {
|
||||
let menuId = markedComplete[k]._id;
|
||||
removeMenuIds.push(menuId);
|
||||
}
|
||||
|
||||
// console.log(" ----- Need to remove Menus: ");
|
||||
console.dir(removeMenuIds);
|
||||
|
||||
// finally we'll cycle through the ids and remove the items we collected up.
|
||||
for (l = 0; l < removeMenuIds.length; l++) {
|
||||
Menus.remove({ _id: removeMenuIds[l] });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue