From 0f77ad2d584ee4dc821efa993cf44dd200cb844a Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 22 Dec 2020 12:49:34 +0100 Subject: [PATCH] Add task filter for kanban --- src/components/list/partials/filters.vue | 2 +- src/store/modules/kanban.js | 4 +-- src/views/list/views/Kanban.vue | 34 ++++++++++++++++++++++-- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/components/list/partials/filters.vue b/src/components/list/partials/filters.vue index 6c17c5d24..d2d2dfeaa 100644 --- a/src/components/list/partials/filters.vue +++ b/src/components/list/partials/filters.vue @@ -518,7 +518,7 @@ export default { } this.prepareSingleValue(filterName) - if (this.filters[filterName] !== '') { + if (typeof this.filters[filterName] !== 'undefined' && this.filters[filterName] !== '') { this[`${servicePrefix}Service`].getAll({}, {s: this.filters[filterName]}) .then(r => { this.$set(this, kind, r) diff --git a/src/store/modules/kanban.js b/src/store/modules/kanban.js index 25bcb0c3e..284b51ab8 100644 --- a/src/store/modules/kanban.js +++ b/src/store/modules/kanban.js @@ -113,14 +113,14 @@ export default { }, }, actions: { - loadBucketsForList(ctx, listId) { + loadBucketsForList(ctx, {listId, params}) { const cancel = setLoading(ctx) // Clear everything to prevent having old buckets in the list if loading the buckets from this list takes a few moments ctx.commit('setBuckets', []) const bucketService = new BucketService() - return bucketService.getAll({listId: listId}) + return bucketService.getAll({listId: listId}, params) .then(r => { ctx.commit('setBuckets', r) ctx.commit('setListId', listId) diff --git a/src/views/list/views/Kanban.vue b/src/views/list/views/Kanban.vue index c135e9126..c921e20a9 100644 --- a/src/views/list/views/Kanban.vue +++ b/src/views/list/views/Kanban.vue @@ -1,5 +1,22 @@