diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 20:02:30 +0000 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /app/assets/javascripts/boards/stores/mutations.js | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) | |
download | gitlab-ce-41fe97390ceddf945f3d967b8fdb3de4c66b7dea.tar.gz |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/stores/mutations.js')
-rw-r--r-- | app/assets/javascripts/boards/stores/mutations.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/stores/mutations.js b/app/assets/javascripts/boards/stores/mutations.js index 2a2ce7652e6..9a50dcf05b8 100644 --- a/app/assets/javascripts/boards/stores/mutations.js +++ b/app/assets/javascripts/boards/stores/mutations.js @@ -33,10 +33,20 @@ export const addItemToList = ({ state, listId, itemId, moveBeforeId, moveAfterId }; export default { + [mutationTypes.RECEIVE_BOARD_SUCCESS]: (state, board) => { + state.board = { + ...board, + labels: board?.labels?.nodes || [], + }; + }, + + [mutationTypes.RECEIVE_BOARD_FAILURE]: (state) => { + state.error = s__('Boards|An error occurred while fetching the board. Please reload the page.'); + }, + [mutationTypes.SET_INITIAL_BOARD_DATA](state, data) { const { allowSubEpics, - boardConfig, boardId, boardType, disabled, @@ -45,7 +55,6 @@ export default { issuableType, } = data; state.allowSubEpics = allowSubEpics; - state.boardConfig = boardConfig; state.boardId = boardId; state.boardType = boardType; state.disabled = disabled; @@ -54,6 +63,10 @@ export default { state.issuableType = issuableType; }, + [mutationTypes.SET_BOARD_CONFIG](state, boardConfig) { + state.boardConfig = boardConfig; + }, + [mutationTypes.RECEIVE_BOARD_LISTS_SUCCESS]: (state, lists) => { state.boardLists = lists; }, |