74 lines
2.8 KiB
HTML
74 lines
2.8 KiB
HTML
{% if navigation_render_location_v2|default('page') == 'global-host' or not global_role_navigation_host_v2|default(false) %}
|
|
{#
|
|
UI/UX V2 Phase 1B — Staff pilot navigation
|
|
|
|
This component deliberately reuses the existing employee self-service
|
|
permission helpers and URLs. It does not grant access, change routes, or
|
|
replace dashboard content tabs.
|
|
#}
|
|
{% set _staff_path = request.url.path %}
|
|
{% set navigation_aria_label_v2 = 'Staff workspace navigation' %}
|
|
{% set navigation_items_v2 = [
|
|
{
|
|
'label': 'Dashboard',
|
|
'url': '/employee/dashboard',
|
|
'visible': can_view_employee_portal(current_user, current_user_permissions, current_user_roles),
|
|
'active': _staff_path == '/employee/dashboard'
|
|
},
|
|
{
|
|
'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')
|
|
},
|
|
{
|
|
'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': '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': 'Alerts',
|
|
'url': '/alerts',
|
|
'visible': true,
|
|
'active': _staff_path.startswith('/alerts'),
|
|
'badge': unread_alert_count if unread_alert_count is defined and unread_alert_count > 0 else none
|
|
}
|
|
] %}
|
|
|
|
<div class="mb-6 overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-soft" data-uiux-v2-pilot="staff">
|
|
{% include "ui/templates/components/navigation_v2.html" %}
|
|
{% include "ui/templates/components/mobile_navigation_v2.html" %}
|
|
</div>
|
|
{% endif %}
|