diff options
Diffstat (limited to 'app/assets/javascripts/boards/stores/getters.js')
-rw-r--r-- | app/assets/javascripts/boards/stores/getters.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/boards/stores/getters.js b/app/assets/javascripts/boards/stores/getters.js index 3688476dc5f..89a3b14b262 100644 --- a/app/assets/javascripts/boards/stores/getters.js +++ b/app/assets/javascripts/boards/stores/getters.js @@ -1,10 +1,11 @@ +import { find } from 'lodash'; import { inactiveId } from '../constants'; export default { getLabelToggleState: state => (state.isShowingLabels ? 'on' : 'off'), isSidebarOpen: state => state.activeId !== inactiveId, isSwimlanesOn: state => { - if (!gon?.features?.boardsWithSwimlanes) { + if (!gon?.features?.boardsWithSwimlanes && !gon?.features?.swimlanes) { return false; } @@ -22,4 +23,16 @@ export default { getActiveIssue: state => { return state.issues[state.activeId] || {}; }, + + getListByLabelId: state => labelId => { + return find(state.boardLists, l => l.label?.id === labelId); + }, + + getListByTitle: state => title => { + return find(state.boardLists, l => l.title === title); + }, + + shouldUseGraphQL: () => { + return gon?.features?.graphqlBoardLists; + }, }; |