diff options
author | Mike Greiling <mike@pixelcog.com> | 2019-04-09 18:50:49 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2019-04-09 18:50:49 +0300 |
commit | 39cb1c069ffe76c506bd6fe2b7b6bb9ffe294032 (patch) | |
tree | bf1c8a084e141a9a28325f3ffee9edd898858de0 /app/assets | |
parent | c715bcec068a986cb9b1771f33f02fde7b443f81 (diff) | |
parent | 631c3d64bf7b493b0139a9e10f4491289cf6bb3e (diff) |
Merge branch 'do-not-reopen-merged-mr' into 'master'
Remove a "reopen merge request button" on a "merged" merge request
Closes #54039
See merge request gitlab-org/gitlab-ce!26965
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/notes/components/comment_form.vue | 9 | ||||
-rw-r--r-- | app/assets/javascripts/notes/constants.js | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 1d6cb9485f7..b30d7fa9b73 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -115,8 +115,11 @@ export default { author() { return this.getUserData; }, - canUpdateIssue() { - return this.getNoteableData.current_user.can_update; + canToggleIssueState() { + return ( + this.getNoteableData.current_user.can_update && + this.getNoteableData.state !== constants.MERGED + ); }, endpoint() { return this.getNoteableData.create_note_path; @@ -415,7 +418,7 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" </div> <loading-button - v-if="canUpdateIssue" + v-if="canToggleIssueState" :loading="isToggleStateButtonLoading" :container-class="[ actionButtonClassNames, diff --git a/app/assets/javascripts/notes/constants.js b/app/assets/javascripts/notes/constants.js index fba3db8542c..bdfb6b8f105 100644 --- a/app/assets/javascripts/notes/constants.js +++ b/app/assets/javascripts/notes/constants.js @@ -7,6 +7,7 @@ export const COMMENT = 'comment'; export const OPENED = 'opened'; export const REOPENED = 'reopened'; export const CLOSED = 'closed'; +export const MERGED = 'merged'; export const EMOJI_THUMBSUP = 'thumbsup'; export const EMOJI_THUMBSDOWN = 'thumbsdown'; export const ISSUE_NOTEABLE_TYPE = 'issue'; |