diff options
Diffstat (limited to 'client/components/swimlanes')
-rw-r--r-- | client/components/swimlanes/swimlanes.jade | 3 | ||||
-rw-r--r-- | client/components/swimlanes/swimlanes.js | 18 |
2 files changed, 20 insertions, 1 deletions
diff --git a/client/components/swimlanes/swimlanes.jade b/client/components/swimlanes/swimlanes.jade index 485b2ffc..3ad43777 100644 --- a/client/components/swimlanes/swimlanes.jade +++ b/client/components/swimlanes/swimlanes.jade @@ -33,7 +33,8 @@ template(name="listsGroup") +addListForm else each lists - +list(this) + if visible this + +list(this) if currentCardIsInThisList _id null +cardDetails(currentCard) if currentUser.isBoardMember diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index 568c0bbe..e0857003 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -246,6 +246,24 @@ BlazeComponent.extendComponent({ currentCardIsInThisList(listId, swimlaneId) { return currentCardIsInThisList(listId, swimlaneId); }, + visible(list) { + if (list.archived) { + // Show archived list only when filter archive is on or archive is selected + if (!(Filter.archive.isSelected() || archivedRequested)) { + return false; + } + } + if (Filter.hideEmpty.isSelected()) { + const swimlaneId = this.parentComponent() + .parentComponent() + .data()._id; + const cards = list.cards(swimlaneId); + if (cards.count() === 0) { + return false; + } + } + return true; + }, onRendered() { const boardComponent = this.parentComponent(); const $listsDom = this.$('.js-lists'); |