fix: route generation in links widget

This commit is contained in:
Shivam Mishra 2020-12-17 12:40:42 +05:30
parent 33e727c788
commit e45fa022a9

View file

@ -60,7 +60,13 @@ export default class LinksWidget extends Widget {
};
this.link_list = this.links.map(item => {
return $(`<a href="${frappe.utils.generate_route(item)}" class="link-item ellipsis ${
const route = frappe.utils.generate_route({
name: item.link_to,
type: item.link_type,
is_query_report: item.is_query_report
})
return $(`<a href="${route}" class="link-item ellipsis ${
item.onboard ? "onboard-spotlight" : ""
} ${disabled_dependent(item)}" type="${item.type}">
<span class="indicator-pill no-margin ${get_indicator_color(item)}"></span>