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