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

This commit is contained in:
Martin Filser 2023-02-22 22:02:23 +01:00
parent 1c966ed7b4
commit 9125ab440d
4 changed files with 6 additions and 6 deletions

View file

@ -463,14 +463,14 @@ BlazeComponent.extendComponent({
if (!this.selectedBoardId.get()) {
return [];
}
const swimlanes = Swimlanes.find(
const swimlanes = ReactiveCache.getSwimlanes(
{
boardId: this.selectedBoardId.get()
},
{
sort: { sort: 1 },
});
if (swimlanes.count())
if (swimlanes.length)
this.selectedSwimlaneId.set(swimlanes.fetch()[0]._id);
return swimlanes;
},
@ -746,7 +746,7 @@ BlazeComponent.extendComponent({
} else if (this.isSwimlaneTemplateSearch) {
element.sort = ReactiveCache.getBoard(this.boardId)
.swimlanes()
.count();
.length;
element.type = 'swimlane';
_id = element.copy(this.boardId);
} else if (this.isBoardTemplateSearch) {