summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes/swimlanes.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-08-16 22:27:44 +0300
committerLauri Ojansivu <x@xet7.org>2019-08-16 22:27:44 +0300
commit026d8f49419a7780c1e46cb2b3c68aaf07bc326a (patch)
tree9bdb006a6a41255c8fd7dae774dfa1407c33831c /client/components/swimlanes/swimlanes.js
parent4b2193436eeedf3f9e8cd2bbf0a134087f77a087 (diff)
parent76731e852db54b20c4025f15137700258806d51b (diff)
downloadwekan-026d8f49419a7780c1e46cb2b3c68aaf07bc326a.tar.gz
wekan-026d8f49419a7780c1e46cb2b3c68aaf07bc326a.tar.bz2
wekan-026d8f49419a7780c1e46cb2b3c68aaf07bc326a.zip
Merge branch 'master' of https://github.com/PDIS/wekan into PDIS-master
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');