Commit 4e77db39 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Fix discussion last updated text.

parent fc0035f6
...@@ -55,6 +55,24 @@ ...@@ -55,6 +55,24 @@
newNotePath() { newNotePath() {
return this.getIssueData.create_note_path; return this.getIssueData.create_note_path;
}, },
lastUpdatedBy() {
const { notes } = this.note;
if (notes.length > 1) {
return notes[notes.length - 1].author;
}
return null;
},
lastUpdatedAt() {
const { notes } = this.note;
if (notes.length > 1) {
return notes[notes.length - 1].created_at;
}
return null;
}
}, },
methods: { methods: {
...mapActions([ ...mapActions([
...@@ -152,9 +170,9 @@ ...@@ -152,9 +170,9 @@
class="discussion" class="discussion"
/> />
<issue-note-edited-text <issue-note-edited-text
v-if="note.last_updated_by" v-if="lastUpdatedBy"
:edited-at="note.last_updated_at" :edited-at="lastUpdatedAt"
:edited-by="note.last_updated_by" :edited-by="lastUpdatedBy"
action-text="Last updated" action-text="Last updated"
class-name="discussion-headline-light js-discussion-headline" class-name="discussion-headline-light js-discussion-headline"
/> />
......
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