Integrate employee dashboard navigation into grouped menu
This commit is contained in:
@@ -10,21 +10,15 @@
|
||||
{% set navigation_items_v2 = [
|
||||
{
|
||||
'label': 'Dashboard',
|
||||
'url': '/employee/dashboard?tab=overview',
|
||||
'visible': can_view_employee_portal(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/dashboard'),
|
||||
'children': [
|
||||
{'label': 'Overview', 'url': '/employee/dashboard?tab=overview', 'active': _staff_path.startswith('/employee/dashboard') and _staff_tab == 'overview'},
|
||||
{'label': 'Work', 'url': '/employee/dashboard?tab=work', 'active': _staff_path.startswith('/employee/dashboard') and _staff_tab == 'work'},
|
||||
{'label': 'Attendance', 'url': '/employee/dashboard?tab=attendance', 'active': _staff_path.startswith('/employee/dashboard') and _staff_tab == 'attendance'},
|
||||
{'label': 'HR & Profile', 'url': '/employee/dashboard?tab=hr', 'active': _staff_path.startswith('/employee/dashboard') and _staff_tab == 'hr'},
|
||||
{'label': 'Reports', 'url': '/employee/dashboard?tab=reports', 'active': _staff_path.startswith('/employee/dashboard') and _staff_tab == 'reports'}
|
||||
]
|
||||
'active': _staff_path.startswith('/employee/dashboard') and (_staff_tab == 'overview' or not _staff_tab)
|
||||
},
|
||||
{
|
||||
'label': 'Work',
|
||||
'url': '/employee/work',
|
||||
'visible': can_view_own_employee_work(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/work')
|
||||
'active': _staff_path.startswith('/employee/work') or (_staff_path.startswith('/employee/dashboard') and _staff_tab == 'work')
|
||||
},
|
||||
{
|
||||
'label': 'Attendance & Leave',
|
||||
@@ -32,7 +26,11 @@
|
||||
can_view_own_employee_attendance(current_user, current_user_permissions, current_user_roles)
|
||||
or can_view_own_employee_leave(current_user, current_user_permissions, current_user_roles)
|
||||
),
|
||||
'active': _staff_path.startswith('/employee/attendance') or _staff_path.startswith('/employee/leave'),
|
||||
'active': (
|
||||
_staff_path.startswith('/employee/attendance')
|
||||
or _staff_path.startswith('/employee/leave')
|
||||
or (_staff_path.startswith('/employee/dashboard') and _staff_tab == 'attendance')
|
||||
),
|
||||
'children': [
|
||||
{
|
||||
'label': 'Attendance',
|
||||
@@ -61,6 +59,7 @@
|
||||
or _staff_path.startswith('/employee/documents')
|
||||
or _staff_path.startswith('/employee/payslips')
|
||||
or _staff_path.startswith('/employee/offboarding')
|
||||
or (_staff_path.startswith('/employee/dashboard') and _staff_tab == 'hr')
|
||||
),
|
||||
'children': [
|
||||
{
|
||||
@@ -102,6 +101,12 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'label': 'Reports',
|
||||
'url': '/employee/dashboard?tab=reports',
|
||||
'visible': can_view_employee_portal(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/dashboard') and _staff_tab == 'reports'
|
||||
},
|
||||
{
|
||||
'label': 'Alerts',
|
||||
'url': '/alerts',
|
||||
|
||||
Reference in New Issue
Block a user