mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
added sort feature for viewing of cards
This commit is contained in:
parent
49df8f4b43
commit
2226ece4b7
3 changed files with 75 additions and 1 deletions
|
@ -168,13 +168,16 @@ BlazeComponent.extendComponent({
|
|||
|
||||
cardsWithLimit(swimlaneId) {
|
||||
const limit = this.cardlimit.get();
|
||||
const defaultSort = { sort: 1 };
|
||||
const sortBy = Session.get('sortBy') ? Session.get('sortBy') : defaultSort;
|
||||
const selector = {
|
||||
listId: this.currentData()._id,
|
||||
archived: false,
|
||||
};
|
||||
if (swimlaneId) selector.swimlaneId = swimlaneId;
|
||||
return Cards.find(Filter.mongoSelector(selector), {
|
||||
sort: ['sort'],
|
||||
// sort: ['sort'],
|
||||
sort:sortBy,
|
||||
limit,
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue