-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Navigation): Add
override_doctype_dashboards
hook for adding HR…
…/Payroll references to other form dashboards - Employee, Holiday list, Project, Task, Timesheet
- Loading branch information
1 parent
4d0aa1f
commit 6f9ef74
Showing
2 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors | ||
# License: GNU General Public License v3. See license.txt | ||
|
||
from frappe import _ | ||
|
||
|
||
def get_dashboard_for_employee(data): | ||
return { | ||
"heatmap": True, | ||
"heatmap_message": _("This is based on the attendance of this Employee"), | ||
"fieldname": "employee", | ||
"non_standard_fieldnames": {"Bank Account": "party", "Employee Grievance": "raised_by"}, | ||
"transactions": [ | ||
{"label": _("Attendance"), "items": ["Attendance", "Attendance Request", "Employee Checkin"]}, | ||
{ | ||
"label": _("Leave"), | ||
"items": ["Leave Application", "Leave Allocation", "Leave Policy Assignment"], | ||
}, | ||
{ | ||
"label": _("Lifecycle"), | ||
"items": [ | ||
"Employee Onboarding", | ||
"Employee Transfer", | ||
"Employee Promotion", | ||
"Employee Grievance", | ||
], | ||
}, | ||
{ | ||
"label": _("Exit"), | ||
"items": ["Employee Separation", "Exit Interview", "Full and Final Statement"], | ||
}, | ||
{"label": _("Shift"), "items": ["Shift Request", "Shift Assignment"]}, | ||
{"label": _("Expense"), "items": ["Expense Claim", "Travel Request", "Employee Advance"]}, | ||
{"label": _("Benefit"), "items": ["Employee Benefit Application", "Employee Benefit Claim"]}, | ||
{ | ||
"label": _("Payroll"), | ||
"items": [ | ||
"Salary Structure Assignment", | ||
"Salary Slip", | ||
"Additional Salary", | ||
"Timesheet", | ||
"Employee Incentive", | ||
"Retention Bonus", | ||
"Bank Account", | ||
], | ||
}, | ||
{ | ||
"label": _("Training"), | ||
"items": ["Training Event", "Training Result", "Training Feedback", "Employee Skill Map"], | ||
}, | ||
{"label": _("Evaluation"), "items": ["Appraisal"]}, | ||
], | ||
} | ||
|
||
|
||
def get_dashboard_for_holiday_list(data): | ||
data["non_standard_fieldnames"].update({"Leave Period": "optional_holiday_list"}) | ||
|
||
data["transactions"].append({"items": ["Leave Period", "Shift Type"]}) | ||
|
||
return data | ||
|
||
|
||
def get_dashboard_for_timesheet(data): | ||
data["transactions"].append({"label": _("Payroll"), "items": ["Salary Slip"]}) | ||
|
||
return data | ||
|
||
|
||
def get_dashboard_for_project(data): | ||
data["transactions"].append( | ||
{"label": _("Claims"), "items": ["Expense Claim"]}, | ||
) | ||
|
||
return data |