diff --git a/app/modules/workspace_navigation/service.py b/app/modules/workspace_navigation/service.py index 627ca7a..eb9013f 100644 --- a/app/modules/workspace_navigation/service.py +++ b/app/modules/workspace_navigation/service.py @@ -105,15 +105,6 @@ def build_workspace_cards(roles: Iterable[str] | None, permissions: Iterable[str priority=70, )) - # Reports centre is available as a role-aware workspace for every authenticated user. - cards.append(WorkspaceCard( - code="reports", - title="Reports Centre", - description="Role-aware reports grouped by work, clients, billing, HR, system and audit areas.", - url="/reports", - badge="Reports", - priority=90, - )) return sorted(cards, key=lambda card: card.priority) @@ -134,6 +125,4 @@ def current_workspace_code(current_path: str | None) -> str: return "client" if path.startswith("/consultant"): return "consultant" - if path.startswith("/reports"): - return "reports" return "" diff --git a/app/modules/workspace_navigation/templates/workspace_navigation/index.html b/app/modules/workspace_navigation/templates/workspace_navigation/index.html index bdda384..aa0b62b 100644 --- a/app/modules/workspace_navigation/templates/workspace_navigation/index.html +++ b/app/modules/workspace_navigation/templates/workspace_navigation/index.html @@ -7,9 +7,9 @@

My Workspaces

-

Open the workspace allowed for your role. This page does not replace any existing module; it only gives a clean entry point to dashboards and reports.

+

Open the workspace allowed for your role. This page does not replace any existing module; it only gives a clean entry point to dashboards and portals.

- Open Reports Centre + Reports Centre will return in final phase
diff --git a/app/ui/templates/base/layout.html b/app/ui/templates/base/layout.html index a5870d7..f1baa6b 100644 --- a/app/ui/templates/base/layout.html +++ b/app/ui/templates/base/layout.html @@ -100,26 +100,11 @@ {% set current_branch_name = firm_branding.branch_name if firm_branding else "" %} {% set domain_context = get_domain_context(request) %} {% set is_system_admin_user = full_auth and ("System Admin" in ui_roles) %} + {% set show_legacy_sidebar = full_auth and is_system_admin_user %} {% set can_manage_local_storage_agent = full_auth and can_view_documents(current_user, ui_perms, ui_roles) and can_upload_documents(current_user, ui_perms, ui_roles) and (ui_roles|select("in", ["Firm Admin", "Partner", "Branch Manager"])|list|length > 0) %} - {% set clean_workspace_paths = [ - '/system-admin/dashboard', - '/firm-admin/dashboard', - '/partner/dashboard', - '/manager/dashboard', - '/employee/dashboard', - '/client/dashboard', - '/consultant/dashboard', - '/workspaces' - ] %} - {% set clean_nav_state = namespace(enabled=False) %} - {% for clean_path in clean_workspace_paths %} - {% if current_path.startswith(clean_path) %}{% set clean_nav_state.enabled = True %}{% endif %} - {% endfor %} - {% set use_clean_top_nav = full_auth and clean_nav_state.enabled %} - -
- {% if not use_clean_top_nav %} +
+ {% if show_legacy_sidebar %} - {% endif %}
- {% if use_clean_top_nav %} - {% include "ui/templates/components/top_workspace_bar.html" %} - {% else %}
-
-

{{ title or "Module Workspace" }}

+
+ {% if not show_legacy_sidebar and full_auth %} + {% if firm_branding.logo_url %} + {{ current_firm_name }} logo + {% else %} +
{{ (current_firm_name[:2] if current_firm_name else 'AF')|upper }}
+ {% endif %} + {% endif %} +
+

{{ title or "Module Workspace" }}

+ {% if not show_legacy_sidebar and full_auth %} +
{{ current_firm_name }}{% if current_branch_name and current_branch_name != "-" %} • {{ current_branch_name }}{% endif %}{% if active_financial_year %} • FY {{ active_financial_year }}{% endif %}
+ {% endif %} +
{% if full_auth %} @@ -504,7 +497,6 @@ {% endif %}
- {% endif %}
{% if flash %} diff --git a/app/ui/templates/components/workspace_switcher.html b/app/ui/templates/components/workspace_switcher.html index 62ccee4..d172dc1 100644 --- a/app/ui/templates/components/workspace_switcher.html +++ b/app/ui/templates/components/workspace_switcher.html @@ -3,11 +3,11 @@ {% set perms = ui_perms if ui_perms is defined else [] %} {% set current = current_path if current_path is defined else request.url.path %} {% set can_employee = ('Staff' in roles) or ('Employee' in roles) or ('employees.ess.view' in perms) or ('employees.work.view_self' in perms) or ('employees.attendance.view_self' in perms) or ('employees.leave.view_self' in perms) or ('employees.documents.view_self' in perms) or ('employees.payroll.view_self' in perms) %} -
+
- - {% if 'System Admin' in roles %}{% endif %} + {% if 'System Admin' in roles %}{% endif %} {% if 'Partner' in roles %}{% endif %} {% if 'Firm Admin' in roles %}{% endif %} {% if 'Manager' in roles or 'Branch Manager' in roles %}{% endif %} @@ -15,6 +15,6 @@ {% if 'Client' in roles %}{% endif %} {% if 'Consultant' in roles %}{% endif %} - All workspaces + All workspaces
{% endif %}