gitlab-org--gitlab-foss/app/assets/javascripts/notes/mixins/issuable_state.js
Fatih Acet fab72e2ad9 Add doc links for confidential and locked issues
With this commit, we add docs link for confidential
and locked issues to note compose and edit forms
2019-06-06 10:37:02 +00:00

26 lines
612 B
JavaScript

import { mapGetters } from 'vuex';
export default {
computed: {
...mapGetters(['getNoteableDataByProp']),
lockedIssueDocsPath() {
return this.getNoteableDataByProp('locked_discussion_docs_path');
},
confidentialIssueDocsPath() {
return this.getNoteableDataByProp('confidential_issues_docs_path');
},
},
methods: {
isConfidential(issue) {
return Boolean(issue.confidential);
},
isLocked(issue) {
return Boolean(issue.discussion_locked);
},
hasWarning(issue) {
return this.isConfidential(issue) || this.isLocked(issue);
},
},
};