feat: allow linking dashboard in desk page

This commit is contained in:
Shivam Mishra 2020-05-14 16:07:57 +05:30
parent 2924b98097
commit e5d5d0b6bb
4 changed files with 7 additions and 3 deletions

View file

@ -127,6 +127,8 @@ class Workspace:
return name in self.allowed_reports
if item_type == "help":
return True
if item_type == "dashboard":
return True
return False

View file

@ -23,7 +23,7 @@
"fieldtype": "Select",
"in_list_view": 1,
"label": "Type",
"options": "DocType\nReport\nPage",
"options": "DocType\nReport\nPage\nDashboard",
"reqd": 1
},
{
@ -88,7 +88,7 @@
],
"istable": 1,
"links": [],
"modified": "2020-05-13 19:26:34.229669",
"modified": "2020-05-14 16:02:15.420993",
"modified_by": "Administrator",
"module": "Desk",
"name": "Desk Shortcut",

View file

@ -24,6 +24,8 @@ function generate_route(item) {
route = "List/" + item.doctype + "/Report/" + item.name;
} else if (type === "page") {
route = item.name;
} else if (type === "dashboard") {
route = "dashboard/" + item.name;
}
route = "#" + route;

View file

@ -145,7 +145,7 @@ class ShortcutDialog extends WidgetDialog {
fieldname: "type",
label: "Type",
reqd: 1,
options: "DocType\nReport\nPage",
options: "DocType\nReport\nPage\nDashboard",
onchange: () => {
if (this.dialog.get_value("type") == "DocType") {
this.dialog.fields_dict.link_to.get_query = () => {