Commit 070285d4 authored by Phil Hughes's avatar Phil Hughes

Merge branch '10012-move-ee-diff-for-boards-issue-card-inner' into 'master'

Replace ee-specific code for boards/issue_card_inner

Closes gitlab-ee#10012

See merge request gitlab-org/gitlab-ce!27394
parents ae534a17 edc096b7
...@@ -4,6 +4,7 @@ import { GlTooltipDirective } from '@gitlab/ui'; ...@@ -4,6 +4,7 @@ import { GlTooltipDirective } from '@gitlab/ui';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
import issueCardInner from 'ee_else_ce/boards/mixins/issue_card_inner';
import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import IssueDueDate from './issue_due_date.vue'; import IssueDueDate from './issue_due_date.vue';
...@@ -19,11 +20,13 @@ export default { ...@@ -19,11 +20,13 @@ export default {
TooltipOnTruncate, TooltipOnTruncate,
IssueDueDate, IssueDueDate,
IssueTimeEstimate, IssueTimeEstimate,
IssueCardWeight: () => import('ee_component/boards/components/issue_card_weight.vue'),
IssueCardInnerScopedLabel, IssueCardInnerScopedLabel,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
mixins: [issueCardInner],
props: { props: {
issue: { issue: {
type: Object, type: Object,
...@@ -135,14 +138,6 @@ export default { ...@@ -135,14 +138,6 @@ export default {
this.applyFilter(filter); this.applyFilter(filter);
}, },
filterByWeight(weight) {
if (!this.updateFilters) return;
const issueWeight = encodeURIComponent(weight);
const filter = `weight=${issueWeight}`;
this.applyFilter(filter);
},
applyFilter(filter) { applyFilter(filter) {
const filterPath = boardsStore.filter.path.split('&'); const filterPath = boardsStore.filter.path.split('&');
const filterIndex = filterPath.indexOf(filter); const filterIndex = filterPath.indexOf(filter);
...@@ -232,6 +227,10 @@ export default { ...@@ -232,6 +227,10 @@ export default {
<issue-due-date v-if="issue.dueDate" :date="issue.dueDate" /><issue-time-estimate <issue-due-date v-if="issue.dueDate" :date="issue.dueDate" /><issue-time-estimate
v-if="issue.timeEstimate" v-if="issue.timeEstimate"
:estimate="issue.timeEstimate" :estimate="issue.timeEstimate"
/><issue-card-weight
v-if="issue.weight"
:weight="issue.weight"
@click="filterByWeight(issue.weight)"
/> />
</span> </span>
</div> </div>
......
export default {
methods: {
filterByWeight() {},
},
};
---
title: Move ee-specific code from boards/components/issue_card_inner.vue
merge_request: 27394
author: Roman Rodionov
type: other
...@@ -285,4 +285,10 @@ describe('Issue card component', () => { ...@@ -285,4 +285,10 @@ describe('Issue card component', () => {
.catch(done.fail); .catch(done.fail);
}); });
}); });
describe('weights', () => {
it('not shows weight component', () => {
expect(component.$el.querySelector('.board-card-weight')).toBeNull();
});
});
}); });
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