fix: Refactor dashboard links in leave policy (#22519)
* fix: refactor dashboard links in leave policy
* fx: code fix
* fix: add labels to links
* fix: code change
diff --git a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py
index 48a2045..ff5dc2f 100644
--- a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py
+++ b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py
@@ -1,4 +1,5 @@
from __future__ import unicode_literals
+from frappe import _
def get_data():
return {
@@ -8,13 +9,17 @@
},
'transactions': [
{
- 'items': ['Employee']
+ 'label': _('Employees'),
+ 'items': ['Employee', 'Employee Grade']
},
{
- 'items': ['Employee Grade']
- },
- {
+ 'label': _('Leaves'),
'items': ['Leave Allocation']
},
]
- }
\ No newline at end of file
+ }
+
+
+
+
+
\ No newline at end of file