From d012ab1ab5a8ac5d3efea4f043d95ce4f2cb7deb Mon Sep 17 00:00:00 2001 From: prssanna Date: Thu, 3 Oct 2019 16:23:47 +0530 Subject: [PATCH] fix: remove 'No Activity' when first notification arrives --- .../js/frappe/ui/notifications/notifications.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/ui/notifications/notifications.js b/frappe/public/js/frappe/ui/notifications/notifications.js index aa8d628d75..ef3d3c7cbe 100644 --- a/frappe/public/js/frappe/ui/notifications/notifications.js +++ b/frappe/public/js/frappe/ui/notifications/notifications.js @@ -197,6 +197,18 @@ frappe.ui.Notifications = class Notifications { let new_item = this.dropdown_items[0]; let new_item_html = this.get_dropdown_item_html(new_item); $(new_item_html).prependTo(this.$dropdown_list.find('#notifications')); + this.change_activity_status(); + } + + change_activity_status() { + if (this.$dropdown_list.find('.activity-status')) { + this.$dropdown_list.find('.activity-status').replaceWith( + `
  • + + ${__('View Full Log')} + +
  • `); + } } check_seen() { @@ -239,7 +251,7 @@ frappe.ui.Notifications = class Notifications { ${__('View Full Log')} `; } else { - body_html += `
  • + body_html += `
  • ${__('No activity')}
  • `;