diff options
Diffstat (limited to 'app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js')
-rw-r--r-- | app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js b/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js index 4b204fdfeb0..5f2a17da630 100644 --- a/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js +++ b/app/assets/javascripts/diff_notes/components/resolve_discussion_btn.js @@ -1,4 +1,4 @@ -/* eslint-disable object-shorthand, func-names, no-else-return */ +/* eslint-disable no-else-return */ /* global CommentsStore */ /* global ResolveService */ @@ -20,34 +20,34 @@ const ResolveDiscussionBtn = Vue.extend({ required: true, }, }, - data: function() { + data() { return { discussion: {}, }; }, computed: { - showButton: function() { + showButton() { if (this.discussion) { return this.discussion.isResolvable(); } else { return false; } }, - isDiscussionResolved: function() { + isDiscussionResolved() { if (this.discussion) { return this.discussion.isResolved(); } else { return false; } }, - buttonText: function() { + buttonText() { if (this.isDiscussionResolved) { return __('Unresolve discussion'); } else { return __('Resolve discussion'); } }, - loading: function() { + loading() { if (this.discussion) { return this.discussion.loading; } else { @@ -55,13 +55,13 @@ const ResolveDiscussionBtn = Vue.extend({ } }, }, - created: function() { + created() { CommentsStore.createDiscussion(this.discussionId, this.canResolve); this.discussion = CommentsStore.state[this.discussionId]; }, methods: { - resolve: function() { + resolve() { ResolveService.toggleResolveForDiscussion(this.mergeRequestId, this.discussionId); }, }, |