Commit fce8ee3e authored by Phil Hughes's avatar Phil Hughes

Can filter by author & assignee

parent d06e20b2
...@@ -14,6 +14,13 @@ ...@@ -14,6 +14,13 @@
this.board.filters = this.getFilterData(); this.board.filters = this.getFilterData();
this.board.getIssues(true); this.board.getIssues(true);
} }
},
'filters': {
handler: function () {
this.board.filters = this.getFilterData();
this.board.getIssues(true);
},
deep: true
} }
}, },
methods: { methods: {
......
...@@ -11,8 +11,10 @@ $(() => { ...@@ -11,8 +11,10 @@ $(() => {
}); });
}, },
renderRow: (label) => { renderRow: (label) => {
if (BoardsStore.findList('title', label.title)) return; const isHidden = BoardsStore.findList('title', label.title),
const $li = $('<li />'), $li = $('<li />', {
class: (isHidden ? 'hidden' : '')
}),
$a = $('<a />', { $a = $('<a />', {
text: label.title, text: label.title,
href: '#' href: '#'
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
state: { state: {
lists: [], lists: [],
filters: { filters: {
author: {}, author_id: null,
assignee: {}, assignee_id: null,
milestone: {}, milestone_id: null,
label: [] label: []
} }
}, },
......
...@@ -149,7 +149,9 @@ ...@@ -149,7 +149,9 @@
if ($dropdown.hasClass('js-filter-bulk-update')) { if ($dropdown.hasClass('js-filter-bulk-update')) {
return; return;
} }
if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) { if (page === 'projects:boards:show') {
BoardsStore.state.filters[$dropdown.data('field-name')] = user.id;
} else if ($dropdown.hasClass('js-filter-submit') && (isIssueIndex || isMRIndex)) {
selectedId = user.id; selectedId = user.id;
return Issuable.filterResults($dropdown.closest('form')); return Issuable.filterResults($dropdown.closest('form'));
} else if ($dropdown.hasClass('js-filter-submit')) { } else if ($dropdown.hasClass('js-filter-submit')) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment