Welcome to mirror list, hosted at ThFree Co, Russian Federation.

issuable_state.js « mixins « notes « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d97d9f6850a59a5f22b2bb7cb41e74f43ef633fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
    },
  },
};