Remove a "reopen merge request button" on a "merged" merge request

This commit is contained in:
Hiroyuki Sato 2019-04-04 00:26:03 +09:00
parent 478077747d
commit 631c3d64bf
3 changed files with 12 additions and 3 deletions

View File

@ -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,

View File

@ -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';

View File

@ -0,0 +1,5 @@
---
title: Remove a "reopen merge request button" on a "merged" merge request
merge_request: 26965
author: Hiroyuki Sato
type: fixed