Add firm admin dashboard and workspace switcher
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{% if full_auth %}
|
||||
{% set ws = namespace(count=0) %}
|
||||
{% if 'System Admin' in ui_roles %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if 'Firm Admin' in ui_roles %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if 'Partner' in ui_roles %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if 'Manager' in ui_roles or 'Branch Manager' in ui_roles %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if 'Staff' in ui_roles or can_view_employee_portal(current_user, ui_perms, ui_roles) %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if 'Client' in ui_roles %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if 'Consultant' in ui_roles %}{% set ws.count = ws.count + 1 %}{% endif %}
|
||||
{% if ws.count > 1 %}
|
||||
<div class="mt-2 flex justify-end">
|
||||
<label class="sr-only" for="workspace_switcher">Workspace</label>
|
||||
<select id="workspace_switcher" onchange="if(this.value){window.location.href=this.value;}" class="max-w-xs rounded-lg border border-brand-200 bg-brand-50 px-3 py-1.5 text-xs font-semibold text-brand-800 shadow-sm hover:bg-brand-100">
|
||||
<option value="">Workspace: switch view</option>
|
||||
{% if 'System Admin' in ui_roles %}<option value="/system-admin/dashboard" {% if current_path.startswith('/system-admin') %}selected{% endif %}>System Admin - Platform Control</option>{% endif %}
|
||||
{% if 'Partner' in ui_roles %}<option value="/partner/dashboard" {% if current_path.startswith('/partner') %}selected{% endif %}>Partner Operations</option>{% endif %}
|
||||
{% if 'Firm Admin' in ui_roles %}<option value="/firm-admin/dashboard" {% if current_path.startswith('/firm-admin') %}selected{% endif %}>Firm Administration</option>{% endif %}
|
||||
{% if 'Manager' in ui_roles or 'Branch Manager' in ui_roles %}<option value="/manager/dashboard" {% if current_path.startswith('/manager') %}selected{% endif %}>Manager / Team Workspace</option>{% endif %}
|
||||
{% if 'Staff' in ui_roles or can_view_employee_portal(current_user, ui_perms, ui_roles) %}<option value="/employee/dashboard" {% if current_path.startswith('/employee') %}selected{% endif %}>My Staff Workspace</option>{% endif %}
|
||||
{% if 'Client' in ui_roles %}<option value="/client/dashboard" {% if current_path.startswith('/client') %}selected{% endif %}>Client Portal</option>{% endif %}
|
||||
{% if 'Consultant' in ui_roles %}<option value="/consultant/dashboard" {% if current_path.startswith('/consultant') %}selected{% endif %}>Consultant Workspace</option>{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user