debian-mirror-gitlab/app/assets/javascripts/notes/mixins/noteable.js
2018-03-27 19:54:05 +05:30

22 lines
430 B
JavaScript

import * as constants from '../constants';
export default {
props: {
note: {
type: Object,
required: true,
},
},
computed: {
noteableType() {
switch (this.note.noteable_type) {
case 'MergeRequest':
return constants.MERGE_REQUEST_NOTEABLE_TYPE;
case 'Issue':
return constants.ISSUE_NOTEABLE_TYPE;
default:
return '';
}
},
},
};