-
Notifications
You must be signed in to change notification settings - Fork 535
/
dashboard_overrides.py
82 lines (68 loc) · 2.19 KB
/
dashboard_overrides.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# 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):
data["transactions"].extend(
[
{"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"]},
]
)
data["non_standard_fieldnames"].update({"Bank Account": "party", "Employee Grievance": "raised_by"})
data.update(
{
"heatmap": True,
"heatmap_message": _("This is based on the attendance of this Employee"),
"fieldname": "employee",
"method": "hrms.overrides.employee_master.get_timeline_data",
}
)
return data
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