mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
insert linked card dialog, sort swimlanes, lists and cards by field "sort"
This commit is contained in:
parent
94953a1c97
commit
06e26d8d89
1 changed files with 19 additions and 3 deletions
|
|
@ -465,7 +465,13 @@ BlazeComponent.extendComponent({
|
||||||
if (!this.selectedBoardId.get()) {
|
if (!this.selectedBoardId.get()) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const swimlanes = Swimlanes.find({ boardId: this.selectedBoardId.get() });
|
const swimlanes = Swimlanes.find(
|
||||||
|
{
|
||||||
|
boardId: this.selectedBoardId.get()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sort: { sort: 1 },
|
||||||
|
});
|
||||||
if (swimlanes.count())
|
if (swimlanes.count())
|
||||||
this.selectedSwimlaneId.set(swimlanes.fetch()[0]._id);
|
this.selectedSwimlaneId.set(swimlanes.fetch()[0]._id);
|
||||||
return swimlanes;
|
return swimlanes;
|
||||||
|
|
@ -475,7 +481,13 @@ BlazeComponent.extendComponent({
|
||||||
if (!this.selectedBoardId.get()) {
|
if (!this.selectedBoardId.get()) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const lists = Lists.find({ boardId: this.selectedBoardId.get() });
|
const lists = Lists.find(
|
||||||
|
{
|
||||||
|
boardId: this.selectedBoardId.get()
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sort: { sort: 1 },
|
||||||
|
});
|
||||||
if (lists.count()) this.selectedListId.set(lists.fetch()[0]._id);
|
if (lists.count()) this.selectedListId.set(lists.fetch()[0]._id);
|
||||||
return lists;
|
return lists;
|
||||||
},
|
},
|
||||||
|
|
@ -485,7 +497,8 @@ BlazeComponent.extendComponent({
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const ownCardsIds = this.board.cards().map(card => card.getRealId());
|
const ownCardsIds = this.board.cards().map(card => card.getRealId());
|
||||||
return Cards.find({
|
return Cards.find(
|
||||||
|
{
|
||||||
boardId: this.selectedBoardId.get(),
|
boardId: this.selectedBoardId.get(),
|
||||||
swimlaneId: this.selectedSwimlaneId.get(),
|
swimlaneId: this.selectedSwimlaneId.get(),
|
||||||
listId: this.selectedListId.get(),
|
listId: this.selectedListId.get(),
|
||||||
|
|
@ -493,6 +506,9 @@ BlazeComponent.extendComponent({
|
||||||
linkedId: { $nin: ownCardsIds },
|
linkedId: { $nin: ownCardsIds },
|
||||||
_id: { $nin: ownCardsIds },
|
_id: { $nin: ownCardsIds },
|
||||||
type: { $nin: ['template-card'] },
|
type: { $nin: ['template-card'] },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sort: { sort: 1 },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue