gitlab-org--gitlab-foss/app/assets/javascripts/boards/components/board_card.js.es6
Phil Hughes e04db427f1 Label description in tooltip
Clicking label adds that label to the filtered by
2016-08-17 17:12:47 +01:00

25 lines
646 B
JavaScript

(() => {
const BoardCard = Vue.extend({
props: {
issue: Object,
issueLinkBase: String,
disabled: Boolean
},
methods: {
filterByLabel: function (label, $event) {
const labelIndex = BoardsStore.state.filters['label_name'].indexOf(label.title);
// $($event.target).tooltip('hide');
if (labelIndex === -1) {
BoardsStore.state.filters['label_name'].push(label.title);
} else {
BoardsStore.state.filters['label_name'].splice(labelIndex, 1);
}
BoardsStore.updateFiltersUrl();
}
}
});
Vue.component('board-card', BoardCard);
})();