summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes/swimlanes.js
diff options
context:
space:
mode:
authorRomulus Urakagi Tsai <urakagi@gmail.com>2019-08-07 07:58:05 +0000
committerRomulus Urakagi Tsai <urakagi@gmail.com>2019-08-07 07:58:05 +0000
commit4f4e0a21f80019048aad6b7a679899c048cb3865 (patch)
treeb891aa2e6a7dfaa84fc9ceefde15f6b44fa9efcf /client/components/swimlanes/swimlanes.js
parentcf9ad221f8654f070a2a7bb1de4522e4b01762dd (diff)
downloadwekan-4f4e0a21f80019048aad6b7a679899c048cb3865.tar.gz
wekan-4f4e0a21f80019048aad6b7a679899c048cb3865.tar.bz2
wekan-4f4e0a21f80019048aad6b7a679899c048cb3865.zip
Add 'show archive' and 'hide empty lists' in filter feature.
Diffstat (limited to 'client/components/swimlanes/swimlanes.js')
-rw-r--r--client/components/swimlanes/swimlanes.js18
1 files changed, 18 insertions, 0 deletions
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');