Add ERP Local Agent secure self update framework
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!doctype html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@@ -108,7 +108,7 @@
|
||||
{% 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) %}
|
||||
|
||||
{# UI/UX V2 Phase 1G — Global Role Navigation Host.
|
||||
{# UI/UX V2 Phase 1G — Global Role Navigation Host.
|
||||
Role navigation is rendered once, immediately below the shared header, so it
|
||||
remains available on dashboards, shared modules, forms, detail pages and
|
||||
submenu pages. Existing page-level navigation includes are suppressed by the
|
||||
@@ -165,7 +165,7 @@
|
||||
{% 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_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_context.is_resolved %}{{ current_branch_name or 'Domain Workspace' }}{% else %}Secure Practice Workspace{% endif %}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/employee') or current_path.startswith('/alerts') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>My Workspace</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
{% if can_view_employee_portal(current_user, ui_perms, ui_roles) %}
|
||||
@@ -243,7 +243,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/partner') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Partner Workspace</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
<a href="/partner/dashboard" class="block rounded-lg px-3 py-1.5 text-sm transition {% if current_path == '/partner/dashboard' %}bg-brand-600 text-white{% else %}text-slate-300 hover:bg-slate-800 hover:text-white{% endif %}">Overview</a>
|
||||
@@ -258,7 +258,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/manager') or current_path.startswith('/employees/work') or current_path.startswith('/employees/progress') or current_path.startswith('/employees/attendance') or current_path.startswith('/employees/leave') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Team Workspace</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
{% if can_manage_employee_work(current_user, ui_perms, ui_roles) %}
|
||||
@@ -283,7 +283,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/billing') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Billing</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
<a href="/billing" class="block rounded-lg px-3 py-1.5 text-sm transition {% if current_path == '/billing' %}bg-brand-600 text-white{% else %}text-slate-300 hover:bg-slate-800 hover:text-white{% endif %}">Invoices</a>
|
||||
@@ -301,7 +301,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/employees') and not (current_path.startswith('/employees/work') or current_path.startswith('/employees/progress') or current_path.startswith('/employees/attendance') or current_path == '/employees/leave') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Team Administration</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
{% if can_view_employee_dashboard(current_user, ui_perms, ui_roles) %}<a href="/employees/dashboard" class="block rounded-lg px-3 py-1.5 text-sm text-slate-300 transition hover:bg-slate-800 hover:text-white">HR Dashboard</a>{% endif %}
|
||||
@@ -339,7 +339,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/system-settings/users') or current_path.startswith('/system-settings/rbac') or current_path.startswith('/services') or current_path.startswith('/clients') or current_path.startswith('/consultants') or current_path.startswith('/email') or current_path.startswith('/notice-cases') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Firm Administration</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
{% if "Firm Admin" in ui_roles or is_system_admin_user %}
|
||||
@@ -387,7 +387,7 @@
|
||||
{% endif %}
|
||||
{% if can_manage_local_storage_agent %}
|
||||
<div class="pt-3 text-[10px] font-semibold uppercase tracking-[0.16em] text-slate-500">Local Storage</div>
|
||||
<a href="/documents/storage-nodes" class="block rounded-lg px-3 py-1.5 text-sm transition {% if current_path.startswith('/documents/storage-nodes') or current_path.startswith('/documents/branch-storage-dashboard') %}bg-brand-600 text-white{% else %}text-slate-300 hover:bg-slate-800 hover:text-white{% endif %}">Local Storage Agent</a>
|
||||
<a href="/documents/storage-nodes" class="block rounded-lg px-3 py-1.5 text-sm transition {% if current_path.startswith('/documents/storage-nodes') or current_path.startswith('/documents/branch-storage-dashboard') %}bg-brand-600 text-white{% else %}text-slate-300 hover:bg-slate-800 hover:text-white{% endif %}">ERP Local Agent</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</details>
|
||||
@@ -397,7 +397,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/domains') or current_path.startswith('/platform-billing') or current_path.startswith('/marketplace') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Platform</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
<div class="pt-3 text-[10px] font-semibold uppercase tracking-[0.16em] text-slate-500">Domain Configuration</div>
|
||||
@@ -419,7 +419,7 @@
|
||||
<details class="group rounded-xl" {% if current_path.startswith('/system-settings') %}open{% endif %}>
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between rounded-xl px-3 py-2 text-sm font-semibold transition hover:bg-slate-800">
|
||||
<span>Core Setup</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
<span class="text-xs text-slate-400 transition group-open:rotate-90">›</span>
|
||||
</summary>
|
||||
<div class="mt-1 space-y-1 border-l border-slate-700/70 pl-3">
|
||||
{% if can_view_settings(current_user, ui_perms, ui_roles) %}
|
||||
@@ -490,11 +490,11 @@
|
||||
<div class="font-medium text-slate-800">{{ current_user.full_name or current_user.email }}</div>
|
||||
<div class="text-slate-500">{{ current_user.email }}</div>
|
||||
{% if current_user.qualification or current_user.designation %}
|
||||
<div class="text-xs text-slate-500">{{ current_user.qualification or '' }}{% if current_user.qualification and current_user.designation %} • {% endif %}{{ current_user.designation or '' }}</div>
|
||||
<div class="text-xs text-slate-500">{{ current_user.qualification or '' }}{% if current_user.qualification and current_user.designation %} • {% endif %}{{ current_user.designation or '' }}</div>
|
||||
{% endif %}
|
||||
<div class="text-xs text-slate-400">
|
||||
Your Firm: {{ current_firm_name }}
|
||||
• Branch: {{ current_branch_name }}{% if active_financial_year %} • FY: {{ active_financial_year }}{% endif %}
|
||||
• Branch: {{ current_branch_name }}{% if active_financial_year %} • FY: {{ active_financial_year }}{% endif %}
|
||||
</div>
|
||||
{% include "ui/templates/components/workspace_switcher.html" %}
|
||||
<div class="mt-2 flex justify-end gap-2">
|
||||
@@ -517,7 +517,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
{% 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>
|
||||
<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>
|
||||
{% endif %}
|
||||
@@ -566,7 +566,7 @@
|
||||
<div class="text-xs text-slate-500">
|
||||
Active Scope:
|
||||
{{ current_firm_name }}
|
||||
• {{ current_branch_name if active_branch_id else "All Branches" }}{% if active_financial_year %} • FY {{ active_financial_year }}{% endif %}
|
||||
• {{ current_branch_name if active_branch_id else "All Branches" }}{% if active_financial_year %} • FY {{ active_financial_year }}{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -650,7 +650,7 @@
|
||||
wrapper.className = "overflow-hidden rounded-2xl border shadow-soft " + priorityClasses(alert.priority);
|
||||
wrapper.innerHTML = `
|
||||
<div class="flex items-start gap-3 p-4">
|
||||
<div class="mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-white/80 text-base">🔔</div>
|
||||
<div class="mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-white/80 text-base">🔔</div>
|
||||
<div class="min-w-0 flex-1">
|
||||
<div class="text-xs font-semibold uppercase tracking-wide opacity-75">New Alert</div>
|
||||
<div class="mt-0.5 line-clamp-2 text-sm font-semibold"></div>
|
||||
@@ -771,3 +771,4 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user