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.
This commit is contained in:
parent
25ef3a9687
commit
25269f66ba
12 changed files with 28 additions and 30 deletions
|
@ -3,8 +3,8 @@ import Vue from 'vue';
|
||||||
|
|
||||||
import Flash from '~/flash';
|
import Flash from '~/flash';
|
||||||
import { __ } from '~/locale';
|
import { __ } from '~/locale';
|
||||||
import '~/vue_shared/models/label';
|
import './models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import './models/assignee';
|
||||||
|
|
||||||
import FilteredSearchBoards from './filtered_search_boards';
|
import FilteredSearchBoards from './filtered_search_boards';
|
||||||
import eventHub from './eventhub';
|
import eventHub from './eventhub';
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* global ListAssignee */
|
/* global ListAssignee */
|
||||||
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import '~/vue_shared/models/label';
|
import './label';
|
||||||
import { isEE, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
import { isEE, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
||||||
import IssueProject from './project';
|
import IssueProject from './project';
|
||||||
import boardsStore from '../stores/boards_store';
|
import boardsStore from '../stores/boards_store';
|
||||||
|
|
11
app/assets/javascripts/boards/models/label.js
Normal file
11
app/assets/javascripts/boards/models/label.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
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 */
|
/* global ListIssue */
|
||||||
|
|
||||||
import { __ } from '~/locale';
|
import { __ } from '~/locale';
|
||||||
import ListLabel from '~/vue_shared/models/label';
|
import ListLabel from './label';
|
||||||
import ListAssignee from '~/vue_shared/models/assignee';
|
import ListAssignee from './assignee';
|
||||||
import { isEE, urlParamsToObject } from '~/lib/utils/common_utils';
|
import { isEE, urlParamsToObject } from '~/lib/utils/common_utils';
|
||||||
import boardsStore from '../stores/boards_store';
|
import boardsStore from '../stores/boards_store';
|
||||||
import ListMilestone from './milestone';
|
import ListMilestone from './milestone';
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
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;
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* global ListIssue */
|
/* global ListIssue */
|
||||||
|
|
||||||
import '~/vue_shared/models/label';
|
import '~/boards/models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import '~/boards/models/assignee';
|
||||||
import '~/boards/models/issue';
|
import '~/boards/models/issue';
|
||||||
import '~/boards/models/list';
|
import '~/boards/models/list';
|
||||||
import Store from '~/boards/stores/modal_store';
|
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 axios from '~/lib/utils/axios_utils';
|
||||||
|
|
||||||
import eventHub from '~/boards/eventhub';
|
import eventHub from '~/boards/eventhub';
|
||||||
import '~/vue_shared/models/label';
|
import '~/boards/models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import '~/boards/models/assignee';
|
||||||
import '~/boards/models/list';
|
import '~/boards/models/list';
|
||||||
import boardsStore from '~/boards/stores/boards_store';
|
import boardsStore from '~/boards/stores/boards_store';
|
||||||
import boardCard from '~/boards/components/board_card.vue';
|
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 axios from '~/lib/utils/axios_utils';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
import '~/vue_shared/models/label';
|
import '~/boards/models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import '~/boards/models/assignee';
|
||||||
import '~/boards/models/issue';
|
import '~/boards/models/issue';
|
||||||
import '~/boards/models/list';
|
import '~/boards/models/list';
|
||||||
import '~/boards/services/board_service';
|
import '~/boards/services/board_service';
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
import '~/vue_shared/models/label';
|
import '~/boards/models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import '~/boards/models/assignee';
|
||||||
import '~/boards/models/issue';
|
import '~/boards/models/issue';
|
||||||
import '~/boards/models/list';
|
import '~/boards/models/list';
|
||||||
import IssueCardInner from '~/boards/components/issue_card_inner.vue';
|
import IssueCardInner from '~/boards/components/issue_card_inner.vue';
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* global ListIssue */
|
/* global ListIssue */
|
||||||
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import '~/vue_shared/models/label';
|
import '~/boards/models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import '~/boards/models/assignee';
|
||||||
import '~/boards/models/issue';
|
import '~/boards/models/issue';
|
||||||
import '~/boards/models/list';
|
import '~/boards/models/list';
|
||||||
import '~/boards/services/board_service';
|
import '~/boards/services/board_service';
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
import MockAdapter from 'axios-mock-adapter';
|
import MockAdapter from 'axios-mock-adapter';
|
||||||
import axios from '~/lib/utils/axios_utils';
|
import axios from '~/lib/utils/axios_utils';
|
||||||
import _ from 'underscore';
|
import _ from 'underscore';
|
||||||
import '~/vue_shared/models/label';
|
import '~/boards/models/label';
|
||||||
import '~/vue_shared/models/assignee';
|
import '~/boards/models/assignee';
|
||||||
import '~/boards/models/issue';
|
import '~/boards/models/issue';
|
||||||
import '~/boards/models/list';
|
import '~/boards/models/list';
|
||||||
import '~/boards/services/board_service';
|
import '~/boards/services/board_service';
|
||||||
|
|
Loading…
Reference in a new issue