diff --git a/frappe/public/js/frappe/ui/toolbar/energy_points_notifications.js b/frappe/public/js/frappe/ui/toolbar/energy_points_notifications.js index bb3b463c02..1c0b91ba24 100644 --- a/frappe/public/js/frappe/ui/toolbar/energy_points_notifications.js +++ b/frappe/public/js/frappe/ui/toolbar/energy_points_notifications.js @@ -13,6 +13,7 @@ frappe.ui.EnergyPointsNotifications = class { this.get_energy_points_list(this.max_length).then(user_points_list => { this.dropdown_items = user_points_list; this.render_energy_points_dropdown(); + this.setup_view_full_log(); if (this.$dropdown_list.find('.unseen').length) { this.$notification_indicator.show(); } @@ -106,7 +107,7 @@ frappe.ui.EnergyPointsNotifications = class { let item_html = this.get_dropdown_item_html(field); if (item_html) body_html += item_html; }); - view_full_log_html = `
  • ${__('View Full Log')}
  • `; + view_full_log_html = `
  • ${__('View Full Log')}
  • `; } else { body_html += `
  • ${__('No activity')}
  • `; } @@ -163,4 +164,10 @@ frappe.ui.EnergyPointsNotifications = class { return message_html; } + setup_view_full_log() { + this.$dropdown_list.find('.full-log-btn').on('click', () => { + frappe.set_route('List', 'Energy Point Log', {user: frappe.session.user}); + }); + } + }; diff --git a/frappe/public/less/navbar.less b/frappe/public/less/navbar.less index db07f7ebcf..14fbdd902a 100644 --- a/frappe/public/less/navbar.less +++ b/frappe/public/less/navbar.less @@ -309,7 +309,9 @@ .points-updates-header { background: @navbar-bg; - padding: 9px; + padding: 10px; + position: sticky; + top: 0; } .points-date-range {