diff --git a/frappe/public/js/frappe/form/footer/form_timeline.js b/frappe/public/js/frappe/form/footer/form_timeline.js
index 95670192bc..18bc7cd06d 100644
--- a/frappe/public/js/frappe/form/footer/form_timeline.js
+++ b/frappe/public/js/frappe/form/footer/form_timeline.js
@@ -172,6 +172,8 @@ class FormTimeline extends BaseTimeline {
}
get_communication_timeline_content(doc) {
+ doc._url = frappe.utils.get_form_link("Communication", doc.name);
+ this.set_communication_doc_status(doc);
if (doc.attachments && typeof doc.attachments === "string") {
doc.attachments = JSON.parse(doc.attachments);
}
@@ -182,6 +184,21 @@ class FormTimeline extends BaseTimeline {
return communication_content;
}
+ set_communication_doc_status(doc) {
+ let indicator_color = "red";
+ if (in_list(["Sent", "Clicked"], doc.delivery_status)) {
+ indicator_color = "green";
+ } else if (doc.delivery_status === "Sending") {
+ indicator_color = "orange";
+ } else if (in_list(["Opened", "Read"], doc.delivery_status)) {
+ indicator_color = "blue";
+ } else if (doc.delivery_status == "Error") {
+ indicator_color = "red";
+ }
+ doc._doc_status = doc.delivery_status;
+ doc._doc_status_indicator = indicator_color;
+ }
+
get_comment_timeline_contents() {
let comment_timeline_contents = [];
(this.doc_info.comments || []).forEach(comment => {
diff --git a/frappe/public/js/frappe/form/templates/timeline_message_box.html b/frappe/public/js/frappe/form/templates/timeline_message_box.html
index 3047924602..a170dfd89d 100644
--- a/frappe/public/js/frappe/form/templates/timeline_message_box.html
+++ b/frappe/public/js/frappe/form/templates/timeline_message_box.html
@@ -11,7 +11,25 @@
-
+
+ {% if (doc._doc_status && doc._doc_status_indicator) { %}
+
+
+ {%= __(doc._doc_status) %}
+
+
+ {% } %}
+
+ {% if (doc._url) { %}
+
+
+
+ {% } %}
+
{{ doc.content }}
diff --git a/frappe/public/scss/desk/timeline.scss b/frappe/public/scss/desk/timeline.scss
index 43db6fffed..15177e85dc 100644
--- a/frappe/public/scss/desk/timeline.scss
+++ b/frappe/public/scss/desk/timeline.scss
@@ -116,6 +116,12 @@ $threshold: 34;
padding: 0;
padding-bottom: 0;
margin-left: var(--margin-sm);
+ --icon-stroke: var(--text-muted);
+ }
+
+ .action-btn:hover {
+ text-decoration: none;
+ --icon-stroke: var(--text-color);
}
}
.comment-edit-box {