Skip to content

Commit

Permalink
fix: Dashboard must accomodate Document Links (#1103) (#1121)
Browse files Browse the repository at this point in the history
- Don't override incoming `data` instead add to it

(cherry picked from commit e802cf9)

Co-authored-by: Marica <[email protected]>
  • Loading branch information
mergify[bot] and marination authored Nov 28, 2023
1 parent db7ce38 commit 42c9591
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions hrms/overrides/dashboard_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@


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"},
"method": "hrms.overrides.employee_master.get_timeline_data",
"transactions": [
data["transactions"].extend(
[
{"label": _("Attendance"), "items": ["Attendance", "Attendance Request", "Employee Checkin"]},
{
"label": _("Leave"),
Expand Down Expand Up @@ -50,8 +45,21 @@ def get_dashboard_for_employee(data):
"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):
Expand Down

0 comments on commit 42c9591

Please sign in to comment.