feat(dashboard): Open linked document instead of list when count is 1
Description
When a dashboard link has only one document, open the document instead of the list when clicking on the link.
This is done by adding the href
attribute to the link, and skipping any frappe.set_route
calls.
Additional attributes data-doctype
and data-name
are added to enable the link preview popover, as shown in the picture below.
I tried to be forward compatible, in case document-links stop using set_route
to instead all have href
s (to allow ctrl/cmd-click to open in a new tab, etc.).