Commit b3af25b7 authored by Florie Guibert's avatar Florie Guibert

Display Epics in Epic Board

Review feedback
parent cf5fa183
import { s__ } from '~/locale';
export const DRAGGABLE_TAG = 'div'; export const DRAGGABLE_TAG = 'div';
/* eslint-disable @gitlab/require-i18n-strings */ /* eslint-disable @gitlab/require-i18n-strings */
...@@ -39,6 +41,15 @@ export const GroupByParamType = { ...@@ -39,6 +41,15 @@ export const GroupByParamType = {
epic: 'epic', epic: 'epic',
}; };
export const ErrorMessages = {
fetchIssueError: s__(
'Boards|An error occurred while fetching the board issues. Please reload the page.',
),
fetchEpicsError: s__(
'Boards|An error occurred while fetching the board epics. Please reload the page.',
),
};
export default { export default {
DRAGGABLE_TAG, DRAGGABLE_TAG,
EpicFilterType, EpicFilterType,
......
...@@ -3,6 +3,7 @@ import Vue from 'vue'; ...@@ -3,6 +3,7 @@ import Vue from 'vue';
import { moveIssueListHelper } from '~/boards/boards_util'; import { moveIssueListHelper } from '~/boards/boards_util';
import mutationsCE, { addIssueToList, removeIssueFromList } from '~/boards/stores/mutations'; import mutationsCE, { addIssueToList, removeIssueFromList } from '~/boards/stores/mutations';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { ErrorMessages } from '../constants';
import * as mutationTypes from './mutation_types'; import * as mutationTypes from './mutation_types';
const notImplemented = () => { const notImplemented = () => {
...@@ -83,15 +84,7 @@ export default { ...@@ -83,15 +84,7 @@ export default {
}, },
[mutationTypes.RECEIVE_ITEMS_FOR_LIST_FAILURE]: (state, listId) => { [mutationTypes.RECEIVE_ITEMS_FOR_LIST_FAILURE]: (state, listId) => {
if (state.isEpicBoard) { state.error = state.isEpicBoard ? ErrorMessages.fetchEpicsError : ErrorMessages.fetchIssueError;
state.error = s__(
'Boards|An error occurred while fetching the board epics. Please reload the page.',
);
} else {
state.error = s__(
'Boards|An error occurred while fetching the board issues. Please reload the page.',
);
}
Vue.set(state.listsFlags, listId, { isLoading: false, isLoadingMore: false }); Vue.set(state.listsFlags, listId, { isLoading: false, isLoadingMore: false });
}, },
......
...@@ -72,7 +72,7 @@ describe('BoardSidebarIterationSelect', () => { ...@@ -72,7 +72,7 @@ describe('BoardSidebarIterationSelect', () => {
const createStore = ({ const createStore = ({
initialState = { initialState = {
activeId: mockIssue.id, activeId: mockIssue.id,
issues: { [mockIssue.id]: { ...mockIssue } }, boardItems: { [mockIssue.id]: { ...mockIssue } },
}, },
} = {}) => { } = {}) => {
store = new Vuex.Store({ store = new Vuex.Store({
......
...@@ -17900,7 +17900,7 @@ msgstr "" ...@@ -17900,7 +17900,7 @@ msgstr ""
msgid "Loading issues" msgid "Loading issues"
msgstr "" msgstr ""
msgid "Loading more issues" msgid "Loading more"
msgstr "" msgstr ""
msgid "Loading snippet" msgid "Loading snippet"
......
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