diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-24 12:07:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-24 12:07:34 +0300 |
commit | 3a4363e0098b1ff7689247e55da416848ac51050 (patch) | |
tree | abd0ba6ccf76af3964e481fe143ccebd3b07909b /app/assets/javascripts/work_items | |
parent | 25bd06f7e75ab5510cb75f0971d210a8d0c93342 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/work_items')
-rw-r--r-- | app/assets/javascripts/work_items/components/work_item_notes.vue | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/app/assets/javascripts/work_items/components/work_item_notes.vue b/app/assets/javascripts/work_items/components/work_item_notes.vue index a59767d8b70..affa6be6e1b 100644 --- a/app/assets/javascripts/work_items/components/work_item_notes.vue +++ b/app/assets/javascripts/work_items/components/work_item_notes.vue @@ -82,6 +82,17 @@ export default { disableActivityFilter() { return this.initialLoading || this.isLoadingMore; }, + formAtTop() { + return this.sortOrder === DESC; + }, + workItemCommentFormProps() { + return { + queryVariables: this.queryVariables, + fullPath: this.fullPath, + workItemId: this.workItemId, + fetchByIid: this.fetchByIid, + }; + }, }, apollo: { workItemNotes: { @@ -199,6 +210,12 @@ export default { <div v-else class="issuable-discussion gl-mb-5 gl-clearfix!"> <template v-if="showTimeline"> <ul class="notes main-notes-list timeline gl-clearfix!"> + <work-item-comment-form + v-if="formAtTop" + v-bind="workItemCommentFormProps" + @error="$emit('error', $event)" + /> + <template v-for="note in notesArray"> <system-note v-if="isSystemNote(note)" @@ -209,10 +226,8 @@ export default { </template> <work-item-comment-form - :query-variables="queryVariables" - :full-path="fullPath" - :work-item-id="workItemId" - :fetch-by-iid="fetchByIid" + v-if="!formAtTop" + v-bind="workItemCommentFormProps" @error="$emit('error', $event)" /> </ul> |