Move every Boards.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory client/)

This commit is contained in:
Martin Filser 2023-02-09 23:16:44 +01:00
parent 76aae41637
commit 10a9306abd
11 changed files with 29 additions and 22 deletions

View file

@ -181,9 +181,10 @@ BlazeComponent.extendComponent({
};
}
return Boards.find(query, {
const ret = ReactiveCache.getBoards(query, {
sort: { sort: 1 /* boards default sorting */ },
});
return ret;
},
boardLists(boardId) {
let boardLists = [];
@ -248,7 +249,7 @@ BlazeComponent.extendComponent({
'copyBoard',
this.currentData()._id,
{
sort: Boards.find({ archived: false }).count(),
sort: ReactiveCache.getBoards({ archived: false }).length,
type: 'board',
title: ReactiveCache.getBoard(this.currentData()._id).title,
},
@ -324,7 +325,7 @@ BlazeComponent.extendComponent({
query.$and[2].$or.push({ 'orgs.orgId': { $in: selectedOrgsValues } });
}
let filteredBoards = Boards.find(query, {}).fetch();
let filteredBoards = ReactiveCache.getBoards(query, {});
let allBoards = document.getElementsByClassName("js-board");
let currBoard;
if (filteredBoards.length > 0) {