From 2fbd1b5069f80e5c7e95d46a52d570eaadf3ff45 Mon Sep 17 00:00:00 2001 From: A R R R Associates Date: Sat, 11 Jul 2026 08:05:15 +0530 Subject: [PATCH] Unify Employee navigation and align full-width header --- .../templates/employees/portal_dashboard.html | 152 +++++------------- .../components/staff_navigation_v2.html | 70 +++++++- .../components/top_workspace_bar.html | 2 +- 3 files changed, 107 insertions(+), 117 deletions(-) diff --git a/app/modules/employees/templates/employees/portal_dashboard.html b/app/modules/employees/templates/employees/portal_dashboard.html index 71ea14e..086954e 100644 --- a/app/modules/employees/templates/employees/portal_dashboard.html +++ b/app/modules/employees/templates/employees/portal_dashboard.html @@ -1,7 +1,6 @@ {% extends "ui/templates/base/layout.html" %} {% block content %}
- {% include "ui/templates/components/staff_navigation_v2.html" %}
@@ -22,80 +21,25 @@
- {% set main_tabs = [ - ('overview','Overview'), - ('work','Work'), - ('attendance','Attendance'), - ('hr','HR & Profile'), - ('reports','Reports') - ] %} + {# Dashboard sections are now part of the unified Staff Dashboard submenu. #} -
-
-
- - - - - Dashboard Menu - - Employee workspace sections - - - -
-
- - -
- -
- {% include "modules/employees/templates/employees/portal_partials/overview.html" %} +
+
Loading dashboard...
{% endblock %} diff --git a/app/ui/templates/components/staff_navigation_v2.html b/app/ui/templates/components/staff_navigation_v2.html index 75b3696..9df7c28 100644 --- a/app/ui/templates/components/staff_navigation_v2.html +++ b/app/ui/templates/components/staff_navigation_v2.html @@ -1,19 +1,24 @@ {% 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. + UI/UX V2 Phase 1B.2 — Unified Employee / Staff navigation. + Presentation only. Existing employee self-service permission helpers, + routes and route-level authorization remain authoritative. #} {% set _staff_path = request.url.path %} +{% set _staff_tab = request.query_params.get('tab', 'overview') %} {% 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' + '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'} + ] }, { 'label': 'Work', @@ -66,8 +71,57 @@ } ] %} -
+
{% include "ui/templates/components/navigation_v2.html" %} {% include "ui/templates/components/mobile_navigation_v2.html" %}
+ + {% endif %} diff --git a/app/ui/templates/components/top_workspace_bar.html b/app/ui/templates/components/top_workspace_bar.html index fa467ff..ca72bce 100644 --- a/app/ui/templates/components/top_workspace_bar.html +++ b/app/ui/templates/components/top_workspace_bar.html @@ -1,4 +1,4 @@ -{% set _uiux_full_width_header = ('System Admin' in (ui_roles|default([], true))) or ('Firm Admin' in (ui_roles|default([], true))) or ('Partner' in (ui_roles|default([], true))) or ('Manager' in (ui_roles|default([], true))) or ('Branch Manager' in (ui_roles|default([], true))) %} +{% set _uiux_full_width_header = ('System Admin' in (ui_roles|default([], true))) or ('Firm Admin' in (ui_roles|default([], true))) or ('Partner' in (ui_roles|default([], true))) or ('Manager' in (ui_roles|default([], true))) or ('Branch Manager' in (ui_roles|default([], true))) or ('Staff' in (ui_roles|default([], true))) or ('Employee' in (ui_roles|default([], true))) %}