Commit b72db796 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Use map getters for notes.

parent afece660
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import { mapGetters } 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';
...@@ -26,6 +27,11 @@ export default { ...@@ -26,6 +27,11 @@ export default {
IssueSystemNote, IssueSystemNote,
IssueCommentForm, IssueCommentForm,
}, },
computed: {
...mapGetters([
'notes',
])
},
methods: { methods: {
component(note) { component(note) {
if (note.individual_note) { if (note.individual_note) {
...@@ -82,7 +88,7 @@ export default { ...@@ -82,7 +88,7 @@ export default {
id="notes-list" id="notes-list"
class="notes main-notes-list timeline"> class="notes main-notes-list timeline">
<component <component
v-for="note in $store.getters.notes" v-for="note in notes"
:is="component(note)" :is="component(note)"
:note="componentData(note)" :note="componentData(note)"
:key="note.id" /> :key="note.id" />
......
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