Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/work_items/components/notes/work_item_note.vue')
-rw-r--r--app/assets/javascripts/work_items/components/notes/work_item_note.vue27
1 files changed, 20 insertions, 7 deletions
diff --git a/app/assets/javascripts/work_items/components/notes/work_item_note.vue b/app/assets/javascripts/work_items/components/notes/work_item_note.vue
index b5e3ea68725..f4c654f054c 100644
--- a/app/assets/javascripts/work_items/components/notes/work_item_note.vue
+++ b/app/assets/javascripts/work_items/components/notes/work_item_note.vue
@@ -3,7 +3,6 @@ import { GlAvatarLink, GlAvatar } from '@gitlab/ui';
import * as Sentry from '@sentry/browser';
import toast from '~/vue_shared/plugins/global_toast';
import { __ } from '~/locale';
-import { i18n, TRACKING_CATEGORY_SHOW } from '~/work_items/constants';
import Tracking from '~/tracking';
import { updateDraft, clearDraft } from '~/lib/utils/autosave';
import { renderMarkdown } from '~/notes/utils';
@@ -11,15 +10,17 @@ import { getLocationHash } from '~/lib/utils/url_utility';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import EditedAt from '~/issues/show/components/edited.vue';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
-import NoteBody from '~/work_items/components/notes/work_item_note_body.vue';
import NoteHeader from '~/notes/components/note_header.vue';
-import NoteActions from '~/work_items/components/notes/work_item_note_actions.vue';
-import updateWorkItemMutation from '~/work_items/graphql/update_work_item.mutation.graphql';
+import { i18n, TRACKING_CATEGORY_SHOW } from '../../constants';
+import groupWorkItemByIidQuery from '../../graphql/group_work_item_by_iid.query.graphql';
+import updateWorkItemMutation from '../../graphql/update_work_item.mutation.graphql';
import updateWorkItemNoteMutation from '../../graphql/notes/update_work_item_note.mutation.graphql';
import workItemByIidQuery from '../../graphql/work_item_by_iid.query.graphql';
import { isAssigneesWidget } from '../../utils';
import WorkItemCommentForm from './work_item_comment_form.vue';
+import NoteActions from './work_item_note_actions.vue';
import WorkItemNoteAwardsList from './work_item_note_awards_list.vue';
+import NoteBody from './work_item_note_body.vue';
export default {
name: 'WorkItemNoteThread',
@@ -35,8 +36,12 @@ export default {
EditedAt,
},
mixins: [Tracking.mixin()],
- inject: ['fullPath'],
+ inject: ['isGroup'],
props: {
+ fullPath: {
+ type: String,
+ required: true,
+ },
workItemId: {
type: String,
required: true,
@@ -169,7 +174,9 @@ export default {
},
apollo: {
workItem: {
- query: workItemByIidQuery,
+ query() {
+ return this.isGroup ? groupWorkItemByIidQuery : workItemByIidQuery;
+ },
variables() {
return {
fullPath: this.fullPath,
@@ -335,6 +342,7 @@ export default {
</note-header>
<div class="gl-display-inline-flex">
<note-actions
+ :full-path="fullPath"
:show-award-emoji="hasAwardEmojiPermission"
:work-item-iid="workItemIid"
:note="note"
@@ -372,7 +380,12 @@ export default {
/>
</div>
<div class="note-awards" :class="isFirstNote ? '' : 'gl-pl-7'">
- <work-item-note-awards-list :note="note" :work-item-iid="workItemIid" :is-modal="isModal" />
+ <work-item-note-awards-list
+ :full-path="fullPath"
+ :note="note"
+ :work-item-iid="workItemIid"
+ :is-modal="isModal"
+ />
</div>
</div>
</timeline-entry-item>