diff --git a/src/components/Boards.vue b/src/components/Boards.vue index 68f8fe9c9..0816702be 100644 --- a/src/components/Boards.vue +++ b/src/components/Boards.vue @@ -21,20 +21,38 @@ --> - diff --git a/src/components/boards/BoardItem.vue b/src/components/boards/BoardItem.vue new file mode 100644 index 000000000..3f8cdf8ae --- /dev/null +++ b/src/components/boards/BoardItem.vue @@ -0,0 +1,75 @@ + + + + + + + diff --git a/src/store/modules/nav.js b/src/store/modules/nav.js index 723e99216..c0dfeadb2 100644 --- a/src/store/modules/nav.js +++ b/src/store/modules/nav.js @@ -36,6 +36,7 @@ const mapBoardToItem = board => { classes: [], bullet: `#${board.color}`, text: board.title, + owner: board.owner, router: { name: 'board', params: { id: board.id } @@ -141,6 +142,16 @@ const getters = { .concat(boards.map(mapBoardToItem)) .concat([addButton]) } + }, + boards: state => { + // filters the boards depending on the active filter + const boards = state.boards.filter(board => { + return state.filter === BOARD_FILTERS.ALL + || (state.filter === BOARD_FILTERS.ARCHIVED && board.archived === true) + || (state.filter === BOARD_FILTERS.SHARED && board.shared === 1) + }) + + return boards.map(mapBoardToItem) } }