Rollback unstable UIUX Phase 1 navigation changes

This commit is contained in:
A R R R Associates
2026-07-10 13:59:57 +05:30
parent 933a1e4a36
commit 18cfb0b8a7
12 changed files with 174 additions and 429 deletions
+17 -33
View File
@@ -4,22 +4,22 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{% set __title_user = current_user if current_user is defined else None %}
{% set __firm_branding = get_current_firm_branding(request, __title_user)|default(none, true) %}
<meta name="theme-color" content="{{ (__firm_branding.primary_color|default('', true)) if __firm_branding else '#1e3a8a' }}" />
{% set __firm_branding = get_current_firm_branding(request, __title_user) %}
<meta name="theme-color" content="{{ __firm_branding.primary_color or '#1e3a8a' }}" />
<link rel="manifest" href="/manifest.webmanifest" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="ARRR ERP" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link rel="apple-touch-icon" href="/static/pwa/icons/icon-192.png" />
{% if __firm_branding and (__firm_branding.favicon_url|default("", true)) %}<link rel="icon" href="{{ __firm_branding.favicon_url }}" />{% endif %}
{% if __firm_branding.favicon_url %}<link rel="icon" href="{{ __firm_branding.favicon_url }}" />{% endif %}
{% set __title_auth = __title_user and request.session.get("otp_verified", False) %}
{% if __title_auth %}
{% set __title_firm = get_current_tenant_name(request, __title_user) %}
{% set __title_branch = get_current_branch_name(request, __title_user) %}
<title>{{ title or "Workspace" }} | {{ __title_firm }}{% if __title_branch and __title_branch != "-" %} - {{ __title_branch }}{% endif %}</title>
{% else %}
<title>{{ title or "Welcome" }} | {{ (__firm_branding.firm_name|default("", true)) if __firm_branding else "Audit Firm ERP" }}</title>
<title>{{ title or "Welcome" }} | {{ __firm_branding.firm_name or "Audit Firm ERP" }}</title>
{% endif %}
<script src="https://cdn.tailwindcss.com"></script>
<script>
@@ -76,25 +76,13 @@
<link rel="stylesheet" href="/static/css/theme_tokens.css?v=7q-dashboard-align-strong" />
<style>
:root {
--af-color-brand-500: {{ (__firm_branding.primary_color|default('', true)) if __firm_branding else '#2563eb' }};
--af-color-brand-600: {{ (__firm_branding.primary_color|default('', true)) if __firm_branding else '#1d4ed8' }};
--af-color-brand-700: {{ (__firm_branding.accent_color|default('', true)) if __firm_branding else '#1e40af' }};
--af-color-brand-800: {{ (__firm_branding.accent_color|default('', true)) if __firm_branding else '#1e3a8a' }};
--af-color-brand-900: {{ (__firm_branding.accent_color|default('', true)) if __firm_branding else '#172554' }};
--af-color-brand-500: {{ __firm_branding.primary_color or '#2563eb' }};
--af-color-brand-600: {{ __firm_branding.primary_color or '#1d4ed8' }};
--af-color-brand-700: {{ __firm_branding.accent_color or '#1e40af' }};
--af-color-brand-800: {{ __firm_branding.accent_color or '#1e3a8a' }};
--af-color-brand-900: {{ __firm_branding.accent_color or '#172554' }};
}
</style>
<style>
.af-nav-link,.af-nav-summary{display:inline-flex;align-items:center;border-radius:.75rem;padding:.55rem .8rem;font-size:.78rem;font-weight:700;color:#475569;transition:.15s;white-space:nowrap}
.af-nav-link:hover,.af-nav-summary:hover{background:#f1f5f9;color:var(--af-color-brand-700)}
.af-nav-link-active{background:var(--af-color-brand-600)!important;color:#fff!important;box-shadow:var(--af-shadow-soft)}
.af-nav-dropdown{position:relative}
.af-nav-summary{cursor:pointer;list-style:none}
.af-nav-summary::-webkit-details-marker{display:none}
.af-nav-menu{position:absolute;left:0;top:calc(100% + .55rem);z-index:70;display:flex;min-width:15rem;flex-direction:column;gap:.15rem;border:1px solid #e2e8f0;border-radius:1rem;background:#fff;padding:.5rem;box-shadow:var(--af-shadow-card)}
.af-nav-menu .af-nav-link{display:flex;width:100%}
@media (max-width:1023px){#af-mobile-nav .af-nav-link,#af-mobile-nav .af-nav-summary{padding:.7rem .8rem}}
</style>
</head>
<body class="min-h-screen bg-slate-100 text-slate-900">
{% set otp_ok = request.session.get("otp_verified", False) %}
@@ -111,31 +99,29 @@
{% set can_view_documents_menu = full_auth and can_view_documents(current_user, ui_perms, ui_roles) and (ui_roles|select("in", document_menu_roles)|list|length > 0) %}
{% set management_menu_roles = ["System Admin", "Firm Admin", "Partner", "Manager", "Branch Manager"] %}
{% set can_view_management_menus = full_auth and (ui_roles|select("in", management_menu_roles)|list|length > 0) %}
{% set firm_branding = (get_current_firm_branding(request, current_user) if full_auth else __firm_branding)|default(none, true) %}
{% set firm_branding = get_current_firm_branding(request, current_user) if full_auth else __firm_branding %}
{% set current_user_photo_url = get_user_profile_photo_url(current_user) if full_auth else None %}
{% set current_user_initials = get_user_initials(current_user) if full_auth else "U" %}
{% set current_firm_name = (firm_branding.firm_name|default("", true)) if firm_branding else "Audit Firm ERP" %}
{% if not current_firm_name %}{% set current_firm_name = "Audit Firm ERP" %}{% endif %}
{% set current_branch_name = (firm_branding.branch_name|default("", true)) if firm_branding else "" %}
{% set current_firm_logo_url = (firm_branding.logo_url|default("", true)) if firm_branding else "" %}
{% set domain_is_resolved = ((get_domain_context(request)|default({}, true)).get("is_resolved", false)) %}
{% set current_firm_name = firm_branding.firm_name if firm_branding else "Audit Firm ERP" %}
{% 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 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) %}
{# Navigation UI Cleanup V2.1
Sidebar is retained only for System Admin users.
All other authenticated users use the floating top workspace bar on every page.
Existing routes and old sidebar code are kept intact. #}
{% set use_clean_top_nav = full_auth %}
{% set use_clean_top_nav = full_auth and not is_system_admin_user %}
<div class="min-h-screen {% if not use_clean_top_nav %}lg:grid lg:grid-cols-[260px_minmax(0,1fr)]{% endif %}">
{% if not use_clean_top_nav %}
<aside class="border-b border-slate-200 bg-slate-900 text-slate-100 lg:min-h-screen lg:border-b-0 lg:border-r lg:border-slate-800">
<div class="flex items-center gap-3 px-5 py-5">
{% if current_firm_logo_url %}<img src="{{ current_firm_logo_url }}" alt="{{ current_firm_name }} logo" class="h-11 w-11 rounded-2xl bg-white object-contain p-1 shadow-soft" />{% else %}<div class="flex h-11 w-11 items-center justify-center rounded-2xl bg-brand-500 font-bold text-white shadow-soft">{{ (current_firm_name[:2] if current_firm_name else 'AF')|upper }}</div>{% endif %}
{% if firm_branding.logo_url %}<img src="{{ firm_branding.logo_url }}" alt="{{ current_firm_name }} logo" class="h-11 w-11 rounded-2xl bg-white object-contain p-1 shadow-soft" />{% else %}<div class="flex h-11 w-11 items-center justify-center rounded-2xl bg-brand-500 font-bold text-white shadow-soft">{{ (current_firm_name[:2] if current_firm_name else 'AF')|upper }}</div>{% endif %}
<div class="min-w-0">
<div class="truncate text-sm font-semibold tracking-wide">{{ current_firm_name }}</div>
<div class="truncate text-xs text-slate-400">{% if full_auth %}{{ current_branch_name }}{% if current_branch_name and current_branch_name != "-" %} Branch{% endif %} • Workspace{% elif domain_is_resolved %}{{ current_branch_name or 'Domain Workspace' }}{% else %}Secure Practice Workspace{% endif %}</div>
<div class="truncate text-xs text-slate-400">{% if full_auth %}{{ current_branch_name }}{% if current_branch_name and current_branch_name != "-" %} Branch{% endif %} • Workspace{% elif domain_context.is_resolved %}{{ current_branch_name or 'Domain Workspace' }}{% else %}Secure Practice Workspace{% endif %}</div>
</div>
</div>
@@ -458,7 +444,7 @@
{% endif %}
</div>
{% else %}
{% if domain_is_resolved %}
{% if domain_context.is_resolved %}
<div class="mb-2 text-xs text-slate-500">{{ current_firm_name }}{% if current_branch_name %} • {{ current_branch_name }}{% endif %}</div>
{% endif %}
<a class="inline-flex rounded-lg bg-brand-600 px-3 py-2 text-sm font-medium text-white hover:bg-brand-700" href="/login">Login</a>
@@ -517,7 +503,6 @@
{% endif %}
<main class="mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8">
{% if full_auth %}{% include "ui/templates/components/breadcrumbs.html" %}{% endif %}
{% if flash %}
<div class="mb-6 rounded-2xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900 shadow-soft">
{{ flash }}
@@ -691,6 +676,5 @@
})();
</script>
<script src="/static/js/navigation_shell.js?v=uiux-navigation-v1"></script>
</body>
</html>