Commit c3a4fa41 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Initial template for system notes.

parent 7433377a
...@@ -4,6 +4,7 @@ import Vuex from 'vuex'; ...@@ -4,6 +4,7 @@ import Vuex from 'vuex';
import storeOptions from '../stores/issue_notes_store'; import storeOptions from '../stores/issue_notes_store';
import IssueNote from './issue_note.vue'; import IssueNote from './issue_note.vue';
import IssueDiscussion from './issue_discussion.vue'; import IssueDiscussion from './issue_discussion.vue';
import IssueSystemNote from './issue_system_note.vue';
Vue.use(Vuex); Vue.use(Vuex);
const store = new Vuex.Store(storeOptions); const store = new Vuex.Store(storeOptions);
...@@ -19,10 +20,15 @@ export default { ...@@ -19,10 +20,15 @@ export default {
components: { components: {
IssueNote, IssueNote,
IssueDiscussion, IssueDiscussion,
IssueSystemNote,
}, },
methods: { methods: {
component(note) { component(note) {
return note.individual_note ? IssueNote : IssueDiscussion; if (note.individual_note) {
return note.notes[0].system ? IssueSystemNote : IssueNote;
}
return IssueDiscussion;
}, },
componentData(note) { componentData(note) {
return note.individual_note ? note.notes[0] : note; return note.individual_note ? note.notes[0] : note;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment