[fix] notification filters, fixes frappe/erpnext#9982 (#3977)
This commit is contained in:
parent
cf3a4a61e8
commit
146247c17d
4 changed files with 7 additions and 4 deletions
|
|
@ -124,7 +124,7 @@ $.extend(frappe.desktop, {
|
|||
frappe.desktop.wrapper.on("click", ".circle", function() {
|
||||
var doctype = $(this).attr('data-doctype');
|
||||
if(doctype) {
|
||||
frappe.set_route('List', doctype, frappe.ui.notifications.get_filters(doctype));
|
||||
frappe.ui.notifications.show_open_count_list(doctype);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ frappe.pages['modules'].on_page_load = function(wrapper) {
|
|||
page.main.on("click", '.open-notification', function(event) {
|
||||
var doctype = $(this).attr('data-doctype');
|
||||
if(doctype) {
|
||||
frappe.set_route('List', doctype, frappe.ui.notifications.get_filters(doctype));
|
||||
frappe.ui.notifications.show_open_count_list(doctype);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ frappe.ui.form.Dashboard = Class.extend({
|
|||
} else {
|
||||
frappe.route_options = this.get_document_filter(doctype);
|
||||
if(show_open) {
|
||||
$.extend(frappe.route_options, frappe.ui.notifications.get_filters(doctype));
|
||||
frappe.ui.notifications.show_open_count_list(doctype);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,10 @@ frappe.ui.notifications = {
|
|||
show_open_count_list: function(doctype) {
|
||||
let filters = this.boot_info.conditions[doctype];
|
||||
if(filters && $.isPlainObject(filters)) {
|
||||
frappe.route_options = filters;
|
||||
if (!frappe.route_options) {
|
||||
frappe.route_options = {};
|
||||
}
|
||||
$.extend(frappe.route_options, filters);
|
||||
}
|
||||
let route = frappe.get_route();
|
||||
if(route[0]==="List" && route[1]===doctype) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue