debian-mirror-gitlab/app/assets/javascripts/notes/mixins/noteable.js

23 lines
430 B
JavaScript
Raw Normal View History

2018-03-27 19:54:05 +05:30
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 '';
}
},
},
};