Group staff navigation using existing navigation structure
This commit is contained in:
@@ -27,46 +27,80 @@
|
||||
'active': _staff_path.startswith('/employee/work')
|
||||
},
|
||||
{
|
||||
'label': 'Attendance',
|
||||
'url': '/employee/attendance',
|
||||
'visible': can_view_own_employee_attendance(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/attendance')
|
||||
'label': 'Attendance & Leave',
|
||||
'visible': (
|
||||
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'),
|
||||
'children': [
|
||||
{
|
||||
'label': 'Attendance',
|
||||
'url': '/employee/attendance',
|
||||
'visible': can_view_own_employee_attendance(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/attendance')
|
||||
},
|
||||
{
|
||||
'label': 'Leave',
|
||||
'url': '/employee/leave',
|
||||
'visible': can_view_own_employee_leave(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/leave')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'label': 'Leave',
|
||||
'url': '/employee/leave',
|
||||
'visible': can_view_own_employee_leave(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/leave')
|
||||
'label': 'Profile & HR',
|
||||
'visible': (
|
||||
can_view_employee_portal(current_user, current_user_permissions, current_user_roles)
|
||||
or can_view_own_employee_documents(current_user, current_user_permissions, current_user_roles)
|
||||
or can_view_own_employee_payslips(current_user, current_user_permissions, current_user_roles)
|
||||
or can_request_own_employee_offboarding(current_user, current_user_permissions, current_user_roles)
|
||||
),
|
||||
'active': (
|
||||
_staff_path.startswith('/employee/profile')
|
||||
or _staff_path.startswith('/employee/documents')
|
||||
or _staff_path.startswith('/employee/payslips')
|
||||
or _staff_path.startswith('/employee/offboarding')
|
||||
),
|
||||
'children': [
|
||||
{
|
||||
'label': 'Profile',
|
||||
'url': '/employee/profile',
|
||||
'visible': can_view_employee_portal(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/profile')
|
||||
},
|
||||
{
|
||||
'label': 'Documents',
|
||||
'url': '/employee/documents',
|
||||
'visible': can_view_own_employee_documents(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/documents')
|
||||
},
|
||||
{
|
||||
'label': 'Payslips',
|
||||
'url': '/employee/payslips',
|
||||
'visible': can_view_own_employee_payslips(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/payslips')
|
||||
},
|
||||
{
|
||||
'label': 'Offboarding',
|
||||
'url': '/employee/offboarding',
|
||||
'visible': can_request_own_employee_offboarding(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/offboarding')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'label': 'Documents',
|
||||
'url': '/employee/documents',
|
||||
'visible': can_view_own_employee_documents(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/documents')
|
||||
},
|
||||
{
|
||||
'label': 'Payslips',
|
||||
'url': '/employee/payslips',
|
||||
'visible': can_view_own_employee_payslips(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/payslips')
|
||||
},
|
||||
{
|
||||
'label': 'Offboarding',
|
||||
'url': '/employee/offboarding',
|
||||
'visible': can_request_own_employee_offboarding(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/offboarding')
|
||||
},
|
||||
{
|
||||
'label': 'Profile',
|
||||
'url': '/employee/profile',
|
||||
'visible': can_view_employee_portal(current_user, current_user_permissions, current_user_roles),
|
||||
'active': _staff_path.startswith('/employee/profile')
|
||||
},
|
||||
{
|
||||
'label': 'Bank Analyzer',
|
||||
'url': '/tools/bank-statement-analyzer',
|
||||
'label': 'Tools',
|
||||
'visible': true,
|
||||
'active': _staff_path.startswith('/tools/bank-statement-analyzer')
|
||||
'active': _staff_path.startswith('/tools/bank-statement-analyzer'),
|
||||
'children': [
|
||||
{
|
||||
'label': 'Bank Analyzer',
|
||||
'url': '/tools/bank-statement-analyzer',
|
||||
'visible': true,
|
||||
'active': _staff_path.startswith('/tools/bank-statement-analyzer')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'label': 'Alerts',
|
||||
|
||||
Reference in New Issue
Block a user