mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 23:51:48 +01:00
Move every Swimlanes.findOne(idOrFirstObjectSelector, options) to the ReactiveCache
This commit is contained in:
parent
0767f50af8
commit
48ba81eb3d
6 changed files with 17 additions and 17 deletions
|
|
@ -13,12 +13,12 @@ BlazeComponent.extendComponent({
|
|||
const listId = targetBoard.getDefaultSubtasksListId();
|
||||
|
||||
//Get the full swimlane data for the parent task.
|
||||
const parentSwimlane = Swimlanes.findOne({
|
||||
const parentSwimlane = ReactiveCache.getSwimlane({
|
||||
boardId: crtBoard._id,
|
||||
_id: card.swimlaneId,
|
||||
});
|
||||
//find the swimlane of the same name in the target board.
|
||||
const targetSwimlane = Swimlanes.findOne({
|
||||
const targetSwimlane = ReactiveCache.getSwimlane({
|
||||
boardId: targetBoard._id,
|
||||
title: parentSwimlane.title,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ BlazeComponent.extendComponent({
|
|||
if (Utils.boardView() === 'board-view-swimlanes')
|
||||
this.swimlaneId = Blaze.getData(swimlane[0])._id;
|
||||
else if (Utils.boardView() === 'board-view-lists' || !Utils.boardView)
|
||||
this.swimlaneId = Swimlanes.findOne({ boardId: this.boardId })._id;
|
||||
this.swimlaneId = ReactiveCache.getSwimlane({ boardId: this.boardId })._id;
|
||||
},
|
||||
|
||||
boards() {
|
||||
|
|
@ -642,7 +642,7 @@ BlazeComponent.extendComponent({
|
|||
);
|
||||
if (Utils.boardView() === 'board-view-swimlanes')
|
||||
this.swimlaneId = Blaze.getData(swimlane[0])._id;
|
||||
else this.swimlaneId = Swimlanes.findOne({ boardId: this.boardId })._id;
|
||||
else this.swimlaneId = ReactiveCache.getSwimlane({ boardId: this.boardId })._id;
|
||||
// List where to insert card
|
||||
this.listId = Blaze.getData(this.list[0])._id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue