Commit 9ddb0780 authored by Simon Knox's avatar Simon Knox

move store to ee

parent eaff88b3
/* eslint-disable comma-dangle, space-before-function-paren, one-var, no-shadow, dot-notation, max-len */ /* eslint-disable comma-dangle, space-before-function-paren, one-var, no-shadow, dot-notation, max-len */
/* global List */ /* global List */
import _ from 'underscore'; import _ from 'underscore';
import Vue from 'vue';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import boardsStoreEE from 'ee/boards/stores/boards_store_ee'; import boardsStoreEE from 'ee/boards/stores/boards_store_ee';
import { getUrlParamsArray } from '../../lib/utils/common_utils'; import { getUrlParamsArray } from '../../lib/utils/common_utils';
...@@ -24,16 +23,6 @@ gl.issueBoards.BoardsStore = { ...@@ -24,16 +23,6 @@ gl.issueBoards.BoardsStore = {
detail: { detail: {
issue: {}, issue: {},
}, },
boardConfig: {
id: false,
name: '',
labels: [],
milestone_id: undefined,
milestone: {},
assignee: {},
assignee_id: '',
weight: null,
},
moving: { moving: {
issue: {}, issue: {},
list: {} list: {}
...@@ -56,14 +45,6 @@ gl.issueBoards.BoardsStore = { ...@@ -56,14 +45,6 @@ gl.issueBoards.BoardsStore = {
this.state.reload = false; this.state.reload = false;
this.state.currentPage = page; this.state.currentPage = page;
}, },
updateBoardConfig(board = {}) {
this.boardConfig.id = board.id;
this.boardConfig.name = board.name;
this.boardConfig.milestone = board.milestone;
this.boardConfig.labels = board.labels || [];
this.boardConfig.assignee = board.assignee || {};
this.boardConfig.weight = board.weight;
},
addList (listObj, defaultAvatar) { addList (listObj, defaultAvatar) {
const list = new List(listObj, defaultAvatar); const list = new List(listObj, defaultAvatar);
this.state.lists.push(list); this.state.lists.push(list);
......
...@@ -11,6 +11,24 @@ class BoardsStoreEE { ...@@ -11,6 +11,24 @@ class BoardsStoreEE {
this.store.removePromotionState = () => { this.store.removePromotionState = () => {
this.removePromotion(); this.removePromotion();
}; };
this.store.boardConfig = {
id: false,
name: '',
labels: [],
milestone: {},
assignee: {},
weight: null,
};
this.store.updateBoardConfig = this.updateBoardConfig;
}
updateBoardConfig(board = {}) {
this.boardConfig.id = board.id;
this.boardConfig.name = board.name;
this.boardConfig.milestone = board.milestone;
this.boardConfig.labels = board.labels || [];
this.boardConfig.assignee = board.assignee || {};
this.boardConfig.weight = board.weight;
} }
shouldAddPromotionState() { shouldAddPromotionState() {
......
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