Commit b9a54358 authored by Martin Hanzel's avatar Martin Hanzel Committed by Kushal Pandya

Move Vue models from vue_shared to boards

Some classes in vue_shared were used only by boards, so they were
moved to the boards directory. There's one use in the epic sidebar
which will be resolved later.
parent b9ff27e2
......@@ -3,8 +3,8 @@ import Vue from 'vue';
import Flash from '~/flash';
import { s__, __ } from '~/locale';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import './models/label';
import './models/assignee';
import FilteredSearchBoards from './filtered_search_boards';
import eventHub from './eventhub';
......
......@@ -4,7 +4,7 @@
/* global ListAssignee */
import Vue from 'vue';
import '~/vue_shared/models/label';
import './label';
import { isEE, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import IssueProject from './project';
import boardsStore from '../stores/boards_store';
......
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
export default class ListLabel {
constructor(obj) {
Object.assign(this, convertObjectPropsToCamelCase(obj, { dropKeys: ['priority'] }), {
priority: obj.priority !== null ? obj.priority : Infinity,
});
}
}
window.ListLabel = ListLabel;
......@@ -2,8 +2,8 @@
/* global ListIssue */
import { __ } from '~/locale';
import ListLabel from '~/vue_shared/models/label';
import ListAssignee from '~/vue_shared/models/assignee';
import ListLabel from './label';
import ListAssignee from './assignee';
import { isEE, urlParamsToObject } from '~/lib/utils/common_utils';
import boardsStore from '../stores/boards_store';
import ListMilestone from './milestone';
......
export default class ListLabel {
constructor(obj) {
this.id = obj.id;
this.title = obj.title;
this.type = obj.type;
this.color = obj.color;
this.textColor = obj.text_color;
this.description = obj.description;
this.priority = obj.priority !== null ? obj.priority : Infinity;
}
}
window.ListLabel = ListLabel;
/* eslint-disable no-param-reassign */
import List from '~/boards/models/list';
import ListAssignee from '~/vue_shared/models/assignee';
import ListAssignee from '~/boards/models/assignee';
import ListMilestone from '~/boards/models/milestone';
const EE_TYPES = {
......
......@@ -2,7 +2,7 @@
import { mapState, mapActions } from 'vuex';
import _ from 'underscore';
import ListLabel from '~/vue_shared/models/label';
import ListLabel from '../../models/label';
import LabelsSelect from '~/vue_shared/components/sidebar/labels_select/base.vue';
......
// This file is duplicated in ~/boards/models/label.js
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
export default class ListLabel {
constructor(obj) {
Object.assign(this, convertObjectPropsToCamelCase(obj, { dropKeys: ['priority'] }), {
priority: obj.priority !== null ? obj.priority : Infinity,
});
}
}
window.ListLabel = ListLabel;
......@@ -3,8 +3,8 @@
import Vue from 'vue';
import _ from 'underscore';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/list';
import IssueCardInner from '~/boards/components/issue_card_inner.vue';
import { listObj } from 'spec/boards/mock_data';
......
/* global ListIssue */
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
import '~/boards/models/list';
import Store from '~/boards/stores/modal_store';
......
......@@ -7,8 +7,8 @@ import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import eventHub from '~/boards/eventhub';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/list';
import boardsStore from '~/boards/stores/boards_store';
import boardCard from '~/boards/components/board_card.vue';
......
......@@ -6,8 +6,8 @@ import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import Cookies from 'js-cookie';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
import '~/boards/models/list';
import '~/boards/services/board_service';
......
......@@ -4,8 +4,8 @@
import Vue from 'vue';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
import '~/boards/models/list';
import IssueCardInner from '~/boards/components/issue_card_inner.vue';
......
/* global ListIssue */
import Vue from 'vue';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
import '~/boards/models/list';
import '~/boards/services/board_service';
......
......@@ -4,8 +4,8 @@
import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
import _ from 'underscore';
import '~/vue_shared/models/label';
import '~/vue_shared/models/assignee';
import '~/boards/models/label';
import '~/boards/models/assignee';
import '~/boards/models/issue';
import '~/boards/models/list';
import '~/boards/services/board_service';
......
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