From 8239f8d875e87bddcf568a048ed7206a3671d106 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sat, 5 Dec 2020 20:10:23 +0530 Subject: [PATCH] fix: User profile timeline style --- .../page/user_profile/user_profile_controller.js | 2 ++ frappe/public/icons/timeless/symbol-defs.svg | 14 ++++++++++++++ .../public/js/frappe/utils/energy_point_utils.js | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/frappe/desk/page/user_profile/user_profile_controller.js b/frappe/desk/page/user_profile/user_profile_controller.js index c555df7ca5..f799501873 100644 --- a/frappe/desk/page/user_profile/user_profile_controller.js +++ b/frappe/desk/page/user_profile/user_profile_controller.js @@ -388,7 +388,9 @@ class UserProfile { }); this.activities_timeline.prepare_timeline_contents = () => { this.activities_timeline.timeline_items = list.map((data) => { + let icon = data.type == 'Appreciation' ? 'clap': data.type == 'Criticism' ? 'criticize': null; return { + icon: icon, creation: data.creation, card: true, content: frappe.energy_points.format_history_log(data), diff --git a/frappe/public/icons/timeless/symbol-defs.svg b/frappe/public/icons/timeless/symbol-defs.svg index 05eba98070..4692cb8ab4 100644 --- a/frappe/public/icons/timeless/symbol-defs.svg +++ b/frappe/public/icons/timeless/symbol-defs.svg @@ -660,4 +660,18 @@ + + + + + + + + + + + + + + diff --git a/frappe/public/js/frappe/utils/energy_point_utils.js b/frappe/public/js/frappe/utils/energy_point_utils.js index 113f5455ce..9ebf041141 100644 --- a/frappe/public/js/frappe/utils/energy_point_utils.js +++ b/frappe/public/js/frappe/utils/energy_point_utils.js @@ -23,7 +23,7 @@ Object.assign(frappe.energy_points, { const separator = ` - `; const route = frappe.utils.get_form_link(log.reference_doctype, log.reference_name); const formatted_log = `
- + ${this.get_points(log.points)} ${this.get_history_log_message(log)}