fix: don't show report builder link on report builder route

This commit is contained in:
prssanna 2021-02-17 13:01:13 +05:30
parent d86832aaf2
commit f7c930d50d

View file

@ -51,10 +51,15 @@ frappe.views.ListViewSelect = class ListViewSelect {
action: () => this.set_route("report"),
current_view_handler: () => {
const reports = this.get_reports();
this.setup_dropdown_in_sidebar("Report", reports, {
label: __("Report Builder"),
action: () => this.set_route("report")
});
let default_action = {};
// Only add action if current route is not report builder
if (frappe.get_route().length > 3) {
default_action = {
label: __("Report Builder"),
action: () => this.set_route("report")
};
}
this.setup_dropdown_in_sidebar("Report", reports, default_action);
}
},
Dashboard: {