Fix optional domain context in shared navigation layout
This commit is contained in:
@@ -118,7 +118,7 @@
|
|||||||
{% if not current_firm_name %}{% set current_firm_name = "Audit Firm ERP" %}{% endif %}
|
{% 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_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 current_firm_logo_url = (firm_branding.logo_url|default("", true)) if firm_branding else "" %}
|
||||||
{% set domain_context = get_domain_context(request) %}
|
{% set domain_is_resolved = ((get_domain_context(request)|default({}, true)).get("is_resolved", false)) %}
|
||||||
{% set is_system_admin_user = full_auth and ("System Admin" in ui_roles) %}
|
{% 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) %}
|
{% 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
|
{# Navigation UI Cleanup V2.1
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
{% 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 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 %}
|
||||||
<div class="min-w-0">
|
<div class="min-w-0">
|
||||||
<div class="truncate text-sm font-semibold tracking-wide">{{ current_firm_name }}</div>
|
<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_context.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_is_resolved %}{{ current_branch_name or 'Domain Workspace' }}{% else %}Secure Practice Workspace{% endif %}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -458,7 +458,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if domain_context.is_resolved %}
|
{% if domain_is_resolved %}
|
||||||
<div class="mb-2 text-xs text-slate-500">{{ current_firm_name }}{% if current_branch_name %} • {{ current_branch_name }}{% endif %}</div>
|
<div class="mb-2 text-xs text-slate-500">{{ current_firm_name }}{% if current_branch_name %} • {{ current_branch_name }}{% endif %}</div>
|
||||||
{% endif %}
|
{% 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>
|
<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>
|
||||||
|
|||||||
Reference in New Issue
Block a user