2021-01-10 00:17:59 +02:00
|
|
|
BlazeComponent.extendComponent({}).register('brokenCardsHeaderBar');
|
|
|
|
|
|
|
|
|
|
Template.brokenCards.helpers({
|
|
|
|
|
userId() {
|
|
|
|
|
return Meteor.userId();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
BlazeComponent.extendComponent({
|
|
|
|
|
onCreated() {
|
|
|
|
|
Meteor.subscribe('setting');
|
|
|
|
|
Meteor.subscribe('brokenCards');
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
brokenCardsList() {
|
2021-01-10 15:35:16 +02:00
|
|
|
const selector = {
|
|
|
|
|
$or: [
|
|
|
|
|
{ boardId: { $in: [null, ''] } },
|
|
|
|
|
{ swimlaneId: { $in: [null, ''] } },
|
|
|
|
|
{ listId: { $in: [null, ''] } },
|
2021-01-11 05:23:11 +02:00
|
|
|
{ permission: 'public' },
|
|
|
|
|
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
|
2021-01-10 15:35:16 +02:00
|
|
|
],
|
2021-01-10 00:17:59 +02:00
|
|
|
};
|
|
|
|
|
|
2021-01-10 15:35:16 +02:00
|
|
|
return Cards.find(selector);
|
2021-01-10 00:17:59 +02:00
|
|
|
},
|
|
|
|
|
}).register('brokenCards');
|