fix: Add doctype and docname to timeline item
This commit is contained in:
parent
214322b1af
commit
d2b7413fab
3 changed files with 10 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ class BaseTimeline {
|
|||
|
||||
make() {
|
||||
this.timeline_wrapper = $(`<div class="new-timeline">`);
|
||||
this.wrapper = this.timeline_wrapper;
|
||||
this.timeline_items_wrapper = $(`<div class="timeline-items">`);
|
||||
this.timeline_actions_wrapper = $(`
|
||||
<div class="timeline-actions">
|
||||
|
|
@ -75,7 +76,10 @@ class BaseTimeline {
|
|||
// timeline_badge, icon, icon_size,
|
||||
// hide_timestamp, is_card
|
||||
const timeline_item = $(`<div class="timeline-item">`);
|
||||
|
||||
timeline_item.attr({
|
||||
"data-doctype": item.doctype,
|
||||
"data-name": item.name,
|
||||
});
|
||||
if (item.icon) {
|
||||
timeline_item.append(`
|
||||
<div class="timeline-badge">
|
||||
|
|
|
|||
|
|
@ -171,6 +171,8 @@ class FormTimeline extends BaseTimeline {
|
|||
creation: communication.creation,
|
||||
is_card: true,
|
||||
content: this.get_communication_timeline_content(communication),
|
||||
doctype: "Communication",
|
||||
name: communication.name
|
||||
});
|
||||
});
|
||||
return communication_timeline_contents;
|
||||
|
|
@ -217,6 +219,8 @@ class FormTimeline extends BaseTimeline {
|
|||
icon: 'small-message',
|
||||
creation: comment.creation,
|
||||
is_card: true,
|
||||
doctype: "Comment",
|
||||
name: comment.name,
|
||||
content: this.get_comment_timeline_content(comment),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<div class="timeline-message-box">
|
||||
<div class="timeline-message-box" data-communication-type="{{ doc.communication_type }}">
|
||||
<span class="flex justify-between">
|
||||
<span class="text-color flex">
|
||||
{% if (doc.comment_type && doc.comment_type == "Comment") { %}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue