diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-14 12:01:07 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-09-14 14:10:41 +0100 |
commit | a319418d9c050097a797fbf4f890cebd5256ed43 (patch) | |
tree | d1c97d9139fa984c8c8a86c5bdbe5c6438e6831b /app/assets/javascripts/notes/mixins | |
parent | 994e7d135947ca162c147c5e0992a0190de22808 (diff) | |
download | gitlab-ce-a319418d9c050097a797fbf4f890cebd5256ed43.tar.gz |
Merge FE
Diffstat (limited to 'app/assets/javascripts/notes/mixins')
-rw-r--r-- | app/assets/javascripts/notes/mixins/issuable_state.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/mixins/issuable_state.js b/app/assets/javascripts/notes/mixins/issuable_state.js new file mode 100644 index 00000000000..a0b3d81d63b --- /dev/null +++ b/app/assets/javascripts/notes/mixins/issuable_state.js @@ -0,0 +1,15 @@ +export default { + methods: { + isIssueConfidential(issue) { + return !!issue.confidential; + }, + + isIssueLocked(issue) { + return !!issue.discussion_locked; + }, + + hasIssueWarning(issue) { + return this.isIssueConfidential(issue) || this.isIssueLocked(issue); + }, + }, +}; |