feat: dashboards for HR module
diff --git a/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py b/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py
new file mode 100644
index 0000000..309427e
--- /dev/null
+++ b/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'kra_template',
+ 'transactions': [
+ {
+ 'items': ['Appraisal']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee/employee_dashboard.py b/erpnext/hr/doctype/employee/employee_dashboard.py
index 46461da..14fa466 100644
--- a/erpnext/hr/doctype/employee/employee_dashboard.py
+++ b/erpnext/hr/doctype/employee/employee_dashboard.py
@@ -13,23 +13,31 @@
},
{
'label': _('Payroll'),
- 'items': ['Salary Structure Assignment', 'Salary Slip', 'Timesheet']
+ 'items': ['Salary Structure Assignment', 'Salary Slip', 'Additional Salary', 'Timesheet']
+ },
+ {
+ 'label': _('Shift'),
+ 'items': ['Shift Request', 'Shift Assignment']
},
{
'label': _('Expense'),
- 'items': ['Expense Claim']
+ 'items': ['Expense Claim', 'Travel Request']
},
{
'label': _('Evaluation'),
'items': ['Appraisal']
},
{
- 'label': _('Training'),
- 'items': ['Training Event', 'Training Result']
- },
- {
'label': _('Lifecycle'),
'items': ['Employee Transfer', 'Employee Promotion', 'Employee Separation']
- }
+ },
+ {
+ 'label': _('Benefit'),
+ 'items': ['Employee Incentive', 'Retention Bonus','Employee Benefit Application', 'Employee Benefit Claim']
+ },
+ {
+ 'label': _('Training'),
+ 'items': ['Training Event', 'Training Result', 'Training Feedback', 'Employee Skill Map']
+ },
]
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py
new file mode 100644
index 0000000..837da53
--- /dev/null
+++ b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'employee_onboarding_template',
+ 'transactions': [
+ {
+ 'items': ['Employee Onboarding']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py b/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py
new file mode 100644
index 0000000..39345f0
--- /dev/null
+++ b/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'employee_separation_template',
+ 'transactions': [
+ {
+ 'items': ['Employee Separation']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py
index d1599a4..22e1de0 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py
+++ b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py
@@ -13,6 +13,9 @@
},
{
'items': ['Leave Period', 'Shift Type']
+ },
+ {
+ 'items': ['Service Level', 'Service Level Agreement']
}
]
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py b/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py
new file mode 100644
index 0000000..2478a63
--- /dev/null
+++ b/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py
@@ -0,0 +1,16 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'job_applicant',
+ 'transactions': [
+ {
+ 'label': _('Employee'),
+ 'items': ['Employee', 'Employee Onboarding']
+ },
+ {
+ 'items': ['Job Offer']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/job_opening/job_opening_dashboard.py b/erpnext/hr/doctype/job_opening/job_opening_dashboard.py
new file mode 100644
index 0000000..c0890b4
--- /dev/null
+++ b/erpnext/hr/doctype/job_opening/job_opening_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'job_title',
+ 'transactions': [
+ {
+ 'items': ['Job Applicant']
+ }
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py b/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py
new file mode 100644
index 0000000..72a1b7c
--- /dev/null
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'leave_allocation',
+ 'transactions': [
+ {
+ 'items': ['Compensatory Leave Request']
+ },
+ {
+ 'items': ['Leave Encashment']
+ }
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/loan_application/loan_application_dashboard.py b/erpnext/hr/doctype/loan_application/loan_application_dashboard.py
new file mode 100644
index 0000000..232c6e3
--- /dev/null
+++ b/erpnext/hr/doctype/loan_application/loan_application_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'loan_application',
+ 'transactions': [
+ {
+ 'items': ['Loan']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/loan_type/loan_type_dashboard.py b/erpnext/hr/doctype/loan_type/loan_type_dashboard.py
new file mode 100644
index 0000000..07b11fe
--- /dev/null
+++ b/erpnext/hr/doctype/loan_type/loan_type_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'loan_type',
+ 'transactions': [
+ {
+ 'items': ['Loan Application']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/payroll_period/payroll_period_dashboard.py b/erpnext/hr/doctype/payroll_period/payroll_period_dashboard.py
new file mode 100644
index 0000000..d524861
--- /dev/null
+++ b/erpnext/hr/doctype/payroll_period/payroll_period_dashboard.py
@@ -0,0 +1,13 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'payroll_period',
+ 'transactions': [
+ {
+ 'label': _('Employee Tax Exemption'),
+ 'items': ['Employee Tax Exemption Proof Submission', 'Employee Tax Exemption Declaration']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py b/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py
index 3803c1d..547f2b8 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py
@@ -4,9 +4,15 @@
def get_data():
return {
'fieldname': 'salary_structure',
+ 'non_standard_fieldnames': {
+ 'Employee Grade': 'default_salary_structure'
+ },
'transactions': [
{
- 'items': ['Salary Structure Assignment']
- }
+ 'items': ['Salary Structure Assignment', 'Salary Slip']
+ },
+ {
+ 'items': ['Employee Grade']
+ },
]
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/shift_request/shift_request_dashboard.py b/erpnext/hr/doctype/shift_request/shift_request_dashboard.py
new file mode 100644
index 0000000..e3bf5df
--- /dev/null
+++ b/erpnext/hr/doctype/shift_request/shift_request_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'shift_request',
+ 'transactions': [
+ {
+ 'items': ['Shift Assignment']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/shift_type/shift_type_dashboard.py b/erpnext/hr/doctype/shift_type/shift_type_dashboard.py
new file mode 100644
index 0000000..91dfbad
--- /dev/null
+++ b/erpnext/hr/doctype/shift_type/shift_type_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'shift_type',
+ 'transactions': [
+ {
+ 'items': ['Shift Request', 'Shift Assignment']
+ }
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py b/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py
new file mode 100644
index 0000000..35a303f
--- /dev/null
+++ b/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py
@@ -0,0 +1,12 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'staffing_plan',
+ 'transactions': [
+ {
+ 'items': ['Job Opening']
+ }
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/training_event/training_event_dashboard.py b/erpnext/hr/doctype/training_event/training_event_dashboard.py
new file mode 100644
index 0000000..663832d
--- /dev/null
+++ b/erpnext/hr/doctype/training_event/training_event_dashboard.py
@@ -0,0 +1,13 @@
+from __future__ import unicode_literals
+from frappe import _
+
+def get_data():
+ return {
+ 'fieldname': 'training_event',
+ 'transactions': [
+ {
+ 'label': _('Result And Feedback'),
+ 'items': ['Training Result', 'Training Feedback']
+ },
+ ],
+ }
\ No newline at end of file
diff --git a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
index d27c7ac..00f1baf 100644
--- a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
+++ b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py
@@ -1,14 +1,22 @@
from __future__ import unicode_literals
from frappe import _
-data = {
- 'heatmap': True,
- 'heatmap_message': _('This is based on logs against this Vehicle. See timeline below for details'),
- 'fieldname': 'license_plate',
- 'transactions': [
- {
- 'label': _('Logs'),
- 'items': ['Vehicle Log']
- }
- ]
-}
\ No newline at end of file
+def get_data():
+ return {
+ 'heatmap': True,
+ 'heatmap_message': _('This is based on logs against this Vehicle. See timeline below for details'),
+ 'fieldname': 'license_plate',
+ 'non_standard_fieldnames':{
+ 'Delivery Trip': 'vehicle'
+ },
+ 'transactions': [
+ {
+ 'label': _('Logs'),
+ 'items': ['Vehicle Log']
+ },
+ {
+ 'label': _('Trip'),
+ 'items': ['Delivery Trip']
+ }
+ ]
+ }
\ No newline at end of file