|
@@ -274,7 +274,7 @@ Lists.helpers({
|
|
},
|
|
},
|
|
|
|
|
|
getWipLimit(option) {
|
|
getWipLimit(option) {
|
|
- const list = Lists.findOne({ _id: this._id });
|
|
|
|
|
|
+ const list = ReactiveCache.getList(this._id);
|
|
if (!list.wipLimit) {
|
|
if (!list.wipLimit) {
|
|
// Necessary check to avoid exceptions for the case where the doc doesn't have the wipLimit field yet set
|
|
// Necessary check to avoid exceptions for the case where the doc doesn't have the wipLimit field yet set
|
|
return 0;
|
|
return 0;
|
|
@@ -389,12 +389,12 @@ Meteor.methods({
|
|
if (limit === 0) {
|
|
if (limit === 0) {
|
|
limit = 1;
|
|
limit = 1;
|
|
}
|
|
}
|
|
- Lists.findOne({ _id: listId }).setWipLimit(limit);
|
|
|
|
|
|
+ ReactiveCache.getList(listId).setWipLimit(limit);
|
|
},
|
|
},
|
|
|
|
|
|
enableWipLimit(listId) {
|
|
enableWipLimit(listId) {
|
|
check(listId, String);
|
|
check(listId, String);
|
|
- const list = Lists.findOne({ _id: listId });
|
|
|
|
|
|
+ const list = ReactiveCache.getList(listId);
|
|
if (list.getWipLimit('value') === 0) {
|
|
if (list.getWipLimit('value') === 0) {
|
|
list.setWipLimit(1);
|
|
list.setWipLimit(1);
|
|
}
|
|
}
|
|
@@ -403,7 +403,7 @@ Meteor.methods({
|
|
|
|
|
|
enableSoftLimit(listId) {
|
|
enableSoftLimit(listId) {
|
|
check(listId, String);
|
|
check(listId, String);
|
|
- const list = Lists.findOne({ _id: listId });
|
|
|
|
|
|
+ const list = ReactiveCache.getList(listId);
|
|
list.toggleSoftLimit(!list.getWipLimit('soft'));
|
|
list.toggleSoftLimit(!list.getWipLimit('soft'));
|
|
},
|
|
},
|
|
|
|
|