Merge pull request #8110 from prssanna/energy-point-notifications
fix: Improvements to Energy Point Notifications
This commit is contained in:
commit
41fbdc5fb8
2 changed files with 11 additions and 2 deletions
|
|
@ -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 = `<li><a href="#List/Energy%20Point%20Log/List" class="text-muted text-center">${__('View Full Log')}</a></li>`;
|
||||
view_full_log_html = `<li><a class="text-muted text-center full-log-btn">${__('View Full Log')}</a></li>`;
|
||||
} else {
|
||||
body_html += `<li><a href="#" onclick = "return false" class="text-muted text-center">${__('No activity')}</a></li>`;
|
||||
}
|
||||
|
|
@ -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});
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -309,7 +309,9 @@
|
|||
|
||||
.points-updates-header {
|
||||
background: @navbar-bg;
|
||||
padding: 9px;
|
||||
padding: 10px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.points-date-range {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue