Commit 77d9bfac authored by Phil Hughes's avatar Phil Hughes

Merge branch '10009-ee-board' into 'master'

Removes EE differences for issue boards

See merge request gitlab-org/gitlab-ce!30851
parents 2cd7c0e5 5a2ecbfc
export const setPromotionState = () => {};
export const setWeigthFetchingState = () => {};
export const setEpicFetchingState = () => {};
export const getMilestoneTitle = () => ({});
export const getBoardsModalData = () => ({});
...@@ -30,6 +30,13 @@ import { ...@@ -30,6 +30,13 @@ import {
} from '~/lib/utils/common_utils'; } from '~/lib/utils/common_utils';
import boardConfigToggle from 'ee_else_ce/boards/config_toggle'; import boardConfigToggle from 'ee_else_ce/boards/config_toggle';
import toggleFocusMode from 'ee_else_ce/boards/toggle_focus'; import toggleFocusMode from 'ee_else_ce/boards/toggle_focus';
import {
setPromotionState,
setWeigthFetchingState,
setEpicFetchingState,
getMilestoneTitle,
getBoardsModalData,
} from 'ee_else_ce/boards/ee_functions';
import mountMultipleBoardsSwitcher from './mount_multiple_boards_switcher'; import mountMultipleBoardsSwitcher from './mount_multiple_boards_switcher';
let issueBoardsApp; let issueBoardsApp;
...@@ -129,6 +136,7 @@ export default () => { ...@@ -129,6 +136,7 @@ export default () => {
}); });
boardsStore.addBlankState(); boardsStore.addBlankState();
setPromotionState(boardsStore);
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
...@@ -143,6 +151,8 @@ export default () => { ...@@ -143,6 +151,8 @@ export default () => {
const { sidebarInfoEndpoint } = newIssue; const { sidebarInfoEndpoint } = newIssue;
if (sidebarInfoEndpoint && newIssue.subscribed === undefined) { if (sidebarInfoEndpoint && newIssue.subscribed === undefined) {
newIssue.setFetchingState('subscriptions', true); newIssue.setFetchingState('subscriptions', true);
setWeigthFetchingState(newIssue, true);
setEpicFetchingState(newIssue, true);
BoardService.getIssueInfo(sidebarInfoEndpoint) BoardService.getIssueInfo(sidebarInfoEndpoint)
.then(res => res.data) .then(res => res.data)
.then(data => { .then(data => {
...@@ -157,6 +167,8 @@ export default () => { ...@@ -157,6 +167,8 @@ export default () => {
} = convertObjectPropsToCamelCase(data); } = convertObjectPropsToCamelCase(data);
newIssue.setFetchingState('subscriptions', false); newIssue.setFetchingState('subscriptions', false);
setWeigthFetchingState(newIssue, false);
setEpicFetchingState(newIssue, false);
newIssue.updateData({ newIssue.updateData({
humanTimeSpent: humanTotalTimeSpent, humanTimeSpent: humanTotalTimeSpent,
timeSpent: totalTimeSpent, timeSpent: totalTimeSpent,
...@@ -169,6 +181,7 @@ export default () => { ...@@ -169,6 +181,7 @@ export default () => {
}) })
.catch(() => { .catch(() => {
newIssue.setFetchingState('subscriptions', false); newIssue.setFetchingState('subscriptions', false);
setWeigthFetchingState(newIssue, false);
Flash(__('An error occurred while fetching sidebar data')); Flash(__('An error occurred while fetching sidebar data'));
}); });
} }
...@@ -203,6 +216,7 @@ export default () => { ...@@ -203,6 +216,7 @@ export default () => {
el: document.getElementById('js-add-list'), el: document.getElementById('js-add-list'),
data: { data: {
filters: boardsStore.state.filters, filters: boardsStore.state.filters,
...getMilestoneTitle($boardApp),
}, },
mounted() { mounted() {
initNewListDropdown(); initNewListDropdown();
...@@ -222,6 +236,7 @@ export default () => { ...@@ -222,6 +236,7 @@ export default () => {
return { return {
modal: ModalStore.store, modal: ModalStore.store,
store: boardsStore.state, store: boardsStore.state,
...getBoardsModalData($boardApp),
canAdminList: this.$options.el.hasAttribute('data-can-admin-list'), canAdminList: this.$options.el.hasAttribute('data-can-admin-list'),
}; };
}, },
...@@ -285,6 +300,6 @@ export default () => { ...@@ -285,6 +300,6 @@ export default () => {
}); });
} }
toggleFocusMode(ModalStore, boardsStore); toggleFocusMode(ModalStore, boardsStore, $boardApp);
mountMultipleBoardsSwitcher(); mountMultipleBoardsSwitcher();
}; };
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