fix: render info type comments on form timeline
This commit is contained in:
parent
1c0e5c20c9
commit
e286cbfc8b
2 changed files with 13 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ def get_docinfo(doc=None, doctype=None, name=None):
|
|||
"assignment_logs": get_comments(doc.doctype, doc.name, 'assignment'),
|
||||
"permissions": get_doc_permissions(doc),
|
||||
"shared": frappe.share.get_users(doc.doctype, doc.name),
|
||||
"info_logs": get_comments(doc.doctype, doc.name, 'Info'),
|
||||
"share_logs": get_comments(doc.doctype, doc.name, 'share'),
|
||||
"like_logs": get_comments(doc.doctype, doc.name, 'Like'),
|
||||
"views": get_view_logs(doc.doctype, doc.name),
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@ class FormTimeline extends BaseTimeline {
|
|||
this.timeline_items.push(...this.get_custom_timeline_contents());
|
||||
this.timeline_items.push(...this.get_assignment_timeline_contents());
|
||||
this.timeline_items.push(...this.get_attachment_timeline_contents());
|
||||
this.timeline_items.push(...this.get_info_timeline_contents());
|
||||
this.timeline_items.push(...this.get_milestone_timeline_contents());
|
||||
}
|
||||
}
|
||||
|
|
@ -269,6 +270,17 @@ class FormTimeline extends BaseTimeline {
|
|||
return assignment_timeline_contents;
|
||||
}
|
||||
|
||||
get_info_timeline_contents() {
|
||||
let info_timeline_contents = [];
|
||||
(this.doc_info.info_logs || []).forEach(info_log => {
|
||||
info_timeline_contents.push({
|
||||
creation: info_log.creation,
|
||||
content: `${this.get_user_link(info_log.comment_email)} ${info_log.content}`,
|
||||
});
|
||||
});
|
||||
return info_timeline_contents;
|
||||
}
|
||||
|
||||
get_attachment_timeline_contents() {
|
||||
let attachment_timeline_contents = [];
|
||||
(this.doc_info.attachment_logs || []).forEach(attachment_log => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue