Made sort cards feature translatable.

This commit is contained in:
Lauri Ojansivu 2021-02-24 16:45:16 +02:00
parent 70e7534933
commit 09a13ef75f
4 changed files with 37 additions and 32 deletions

View file

@ -168,8 +168,8 @@ BlazeComponent.extendComponent({
cardsWithLimit(swimlaneId) {
const limit = this.cardlimit.get();
const defaultSort = { sort: 1 };
const sortBy = Session.get('sortBy') ? Session.get('sortBy') : defaultSort;
const defaultSort = { sort: 1 };
const sortBy = Session.get('sortBy') ? Session.get('sortBy') : defaultSort;
const selector = {
listId: this.currentData()._id,
archived: false,
@ -177,7 +177,7 @@ BlazeComponent.extendComponent({
if (swimlaneId) selector.swimlaneId = swimlaneId;
return Cards.find(Filter.mongoSelector(selector), {
// sort: ['sort'],
sort:sortBy,
sort: sortBy,
limit,
});
},