Commit 6eef6eb6 authored by Coung Ngo's avatar Coung Ngo Committed by Denys Mishunov

Move code to ~/issuable

parent 0b93a127
......@@ -9,8 +9,8 @@ import {
} from '@gitlab/ui';
import IssueDueDate from '~/boards/components/issue_due_date.vue';
import { sprintf } from '~/locale';
import relatedIssuableMixin from '../../mixins/related_issuable_mixin';
import CiIcon from '../ci_icon.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue';
import relatedIssuableMixin from '../mixins/related_issuable_mixin';
import IssueAssignees from './issue_assignees.vue';
import IssueMilestone from './issue_milestone.vue';
......
......@@ -2,7 +2,7 @@
import { GlLink, GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { mapState, mapActions } from 'vuex';
import { sprintf, __, n__ } from '~/locale';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
import { parseIssuableData } from '~/issues/show/utils/parse_data';
export default {
......
......@@ -28,7 +28,7 @@ import { convertToCamelCase } from '~/lib/utils/text_utility';
import { mergeUrlParams, setUrlFragment, isExternal } from '~/lib/utils/url_utility';
import { sprintf, __ } from '~/locale';
import initUserPopovers from '~/user_popovers';
import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import IssueAssignees from '~/issuable/components/issue_assignees.vue';
export default {
i18n: {
......
<script>
import { GlLink, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import Issuable from '~/vue_shared/mixins/issuable';
import issuableStateMixin from '../mixins/issuable_state';
export default {
......@@ -9,8 +8,17 @@ export default {
GlIcon,
GlLink,
},
mixins: [Issuable, issuableStateMixin],
mixins: [issuableStateMixin],
props: {
issuableType: {
required: true,
type: String,
},
},
computed: {
issuableDisplayName() {
return this.issuableType.replace(/_/g, ' ');
},
projectArchivedWarning() {
return __('This project is archived and cannot be commented on.');
},
......
<script>
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import relatedIssuableMixin from '~/vue_shared/mixins/related_issuable_mixin';
import relatedIssuableMixin from '~/issuable/mixins/related_issuable_mixin';
export default {
name: 'IssueToken',
......
......@@ -2,7 +2,7 @@
import { GlLoadingIcon } from '@gitlab/ui';
import Sortable from 'sortablejs';
import sortableConfig from '~/sortable/sortable_config';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
export default {
name: 'RelatedIssuesList',
......
......@@ -6,7 +6,7 @@ import { isScopedLabel } from '~/lib/utils/common_utils';
import { differenceInSeconds, getTimeago, SECONDS_IN_DAY } from '~/lib/utils/datetime_utility';
import { isExternal, setUrlFragment } from '~/lib/utils/url_utility';
import { __, n__, sprintf } from '~/locale';
import IssuableAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import IssuableAssignees from '~/issuable/components/issue_assignees.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago';
export default {
......
export default {
props: {
issuableType: {
required: true,
type: String,
},
},
computed: {
issuableDisplayName() {
return this.issuableType.replace(/_/g, ' ');
},
},
};
......@@ -16,8 +16,8 @@ import ItemDueDate from '~/boards/components/issue_due_date.vue';
import { __ } from '~/locale';
import { isScopedLabel } from '~/lib/utils/common_utils';
import ItemAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import ItemMilestone from '~/vue_shared/components/issue/issue_milestone.vue';
import ItemAssignees from '~/issuable/components/issue_assignees.vue';
import ItemMilestone from '~/issuable/components/issue_milestone.vue';
import { ChildType, ChildState, itemRemoveModalId } from '../constants';
import EpicHealthStatus from './epic_health_status.vue';
......
<script>
import { GlIcon } from '@gitlab/ui';
import { n__ } from '~/locale';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
export default {
name: 'BlockingMergeRequestsBody',
......
......@@ -4,8 +4,8 @@ import { TEST_HOST } from 'helpers/test_constants';
import {
defaultAssignees,
defaultMilestone,
} from 'jest/vue_shared/components/issue/related_issuable_mock_data';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
} from 'jest/issuable/components/related_issuable_mock_data';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
describe('RelatedIssuableItem', () => {
let wrapper;
......
import { mount } from '@vue/test-utils';
import IssueWeight from 'ee/boards/components/issue_card_weight.vue';
import { issuable1 } from 'jest/vue_shared/components/issue/related_issuable_mock_data';
import { issuable1 } from 'jest/issuable/components/related_issuable_mock_data';
import RelatedIssuesList from '~/related_issues/components/related_issues_list.vue';
import { PathIdSeparator } from '~/related_issues/constants';
......
......@@ -13,8 +13,8 @@ import createDefaultStore from 'ee/related_items_tree/store';
import * as epicUtils from 'ee/related_items_tree/utils/epic_utils';
import ItemDueDate from '~/boards/components/issue_due_date.vue';
import { PathIdSeparator } from '~/related_issues/constants';
import ItemAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import ItemMilestone from '~/vue_shared/components/issue/issue_milestone.vue';
import ItemAssignees from '~/issuable/components/issue_assignees.vue';
import ItemMilestone from '~/issuable/components/issue_milestone.vue';
import {
mockParentItem,
......
import { shallowMount } from '@vue/test-utils';
import BlockingMergeRequestBody from 'ee/vue_merge_request_widget/components/blocking_merge_requests/blocking_merge_request_body.vue';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
describe('BlockingMergeRequestBody', () => {
it('shows hidden merge request text if hidden MRs exist', () => {
......
......@@ -10,7 +10,7 @@ module QA
element :issuable_search_container
end
view 'app/assets/javascripts/vue_shared/components/issue/issue_assignees.vue' do
view 'app/assets/javascripts/issuable/components/issue_assignees.vue' do
element :assignee_link
element :avatar_counter_content
end
......
......@@ -11,7 +11,7 @@ module QA
include Page::Component::Issuable::Sidebar
prepend Mobile::Page::Project::Issue::Show if Runtime::Env.mobile_layout?
view 'app/assets/javascripts/vue_shared/components/issue/related_issuable_item.vue' do
view 'app/assets/javascripts/issuable/components/related_issuable_item.vue' do
element :remove_related_issue_button
end
......
import { shallowMount } from '@vue/test-utils';
import { mockAssigneesList } from 'jest/boards/mock_data';
import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import IssueAssignees from '~/issuable/components/issue_assignees.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
const TEST_CSS_CLASSES = 'test-classes';
......
......@@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import { mockMilestone } from 'jest/boards/mock_data';
import IssueMilestone from '~/vue_shared/components/issue/issue_milestone.vue';
import IssueMilestone from '~/issuable/components/issue_milestone.vue';
const createComponent = (milestone = mockMilestone) => {
const Component = Vue.extend(IssueMilestone);
......
......@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils';
import { TEST_HOST } from 'helpers/test_constants';
import IssueDueDate from '~/boards/components/issue_due_date.vue';
import { formatDate } from '~/lib/utils/datetime_utility';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
import { defaultAssignees, defaultMilestone } from './related_issuable_mock_data';
describe('RelatedIssuableItem', () => {
......
......@@ -4,7 +4,7 @@ import {
issuable1,
issuable2,
issuable3,
} from 'jest/vue_shared/components/issue/related_issuable_mock_data';
} from 'jest/issuable/components/related_issuable_mock_data';
import RelatedIssuesBlock from '~/related_issues/components/related_issues_block.vue';
import {
linkedIssueTypesMap,
......
......@@ -5,7 +5,7 @@ import {
issuable3,
issuable4,
issuable5,
} from 'jest/vue_shared/components/issue/related_issuable_mock_data';
} from 'jest/issuable/components/related_issuable_mock_data';
import IssueDueDate from '~/boards/components/issue_due_date.vue';
import RelatedIssuesList from '~/related_issues/components/related_issues_list.vue';
import { PathIdSeparator } from '~/related_issues/constants';
......
......@@ -5,7 +5,7 @@ import {
defaultProps,
issuable1,
issuable2,
} from 'jest/vue_shared/components/issue/related_issuable_mock_data';
} from 'jest/issuable/components/related_issuable_mock_data';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import RelatedIssuesRoot from '~/related_issues/components/related_issues_root.vue';
......
......@@ -4,7 +4,7 @@ import {
issuable3,
issuable4,
issuable5,
} from 'jest/vue_shared/components/issue/related_issuable_mock_data';
} from 'jest/issuable/components/related_issuable_mock_data';
import RelatedIssuesStore from '~/related_issues/stores/related_issues_store';
describe('RelatedIssuesStore', () => {
......
......@@ -4,7 +4,7 @@ import mockData from 'test_fixtures/issues/related_merge_requests.json';
import axios from '~/lib/utils/axios_utils';
import RelatedMergeRequests from '~/issues/related_merge_requests/components/related_merge_requests.vue';
import createStore from '~/issues/related_merge_requests/store/index';
import RelatedIssuableItem from '~/vue_shared/components/issue/related_issuable_item.vue';
import RelatedIssuableItem from '~/issuable/components/related_issuable_item.vue';
const API_ENDPOINT = '/api/v4/projects/2/issues/33/related_merge_requests';
const localVue = createLocalVue();
......
......@@ -7,7 +7,7 @@ import { isScopedLabel } from '~/lib/utils/common_utils';
import { formatDate } from '~/lib/utils/datetime_utility';
import { mergeUrlParams } from '~/lib/utils/url_utility';
import initUserPopovers from '~/user_popovers';
import IssueAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import IssueAssignees from '~/issuable/components/issue_assignees.vue';
import { simpleIssue, testAssignees, testLabels } from '../issuable_list_test_data';
jest.mock('~/user_popovers');
......
......@@ -2,7 +2,7 @@ import { GlLink, GlLabel, GlIcon, GlFormCheckbox, GlSprintf } from '@gitlab/ui';
import { useFakeDate } from 'helpers/fake_date';
import { shallowMountExtended as shallowMount } from 'helpers/vue_test_utils_helper';
import IssuableItem from '~/vue_shared/issuable/list/components/issuable_item.vue';
import IssuableAssignees from '~/vue_shared/components/issue/issue_assignees.vue';
import IssuableAssignees from '~/issuable/components/issue_assignees.vue';
import { mockIssuable, mockRegularLabel, mockScopedLabel } from '../mock_data';
......
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