Upgrade consultant dashboard to v2 grouped portal

This commit is contained in:
A R R R Associates
2026-07-06 11:51:56 +05:30
parent 4a2af8f9d1
commit eb23740bff
5 changed files with 73 additions and 7 deletions
@@ -8,11 +8,12 @@
<div>
<p class="text-xs font-semibold uppercase tracking-[0.22em] text-brand-100">Consultant Portal</p>
<h2 class="mt-2 text-2xl font-semibold">Consultant Workspace</h2>
<p class="mt-2 max-w-3xl text-sm text-brand-100">Track assigned work, linked clients, documents, clarifications and service requests from one place.</p>
<p class="mt-2 max-w-3xl text-sm text-brand-100">A grouped workspace for assignments, client requests, documents, clarifications and consultant reports.</p>
</div>
<div class="flex flex-wrap gap-2">
<a href="/consultant/work" class="rounded-xl bg-white px-4 py-2 text-sm font-semibold text-brand-700 hover:bg-brand-50">Open Work Board</a>
<a href="/consultant/service-requests" class="rounded-xl border border-white/40 px-4 py-2 text-sm font-semibold text-white hover:bg-white/10">Service Requests</a>
<a href="/consultant/communications" class="rounded-xl border border-white/40 px-4 py-2 text-sm font-semibold text-white hover:bg-white/10">Clarifications</a>
</div>
</div>
</section>
@@ -20,11 +21,9 @@
<section class="rounded-3xl border border-slate-200 bg-white p-3 shadow-soft">
{% set tabs = [
('overview','Overview'),
('assigned-work','Assigned Work'),
('clients','Clients'),
('documents','Documents'),
('clarifications','Clarifications'),
('requests','Requests'),
('work-centre','Work Centre'),
('clients-requests','Clients & Requests'),
('documents-clarifications','Documents & Clarifications'),
('reports','Reports')
] %}
<div class="flex gap-2 overflow-x-auto" id="consultant-portal-tabs">
@@ -35,7 +34,17 @@
</section>
<section id="consultant-portal-panel">
{% include "modules/consultants/templates/consultants/portal_partials/overview.html" %}
{% if active_tab == 'work-centre' %}
{% include "modules/consultants/templates/consultants/portal_partials/work_centre.html" %}
{% elif active_tab == 'clients-requests' %}
{% include "modules/consultants/templates/consultants/portal_partials/clients_requests.html" %}
{% elif active_tab == 'documents-clarifications' %}
{% include "modules/consultants/templates/consultants/portal_partials/documents_clarifications.html" %}
{% elif active_tab == 'reports' %}
{% include "modules/consultants/templates/consultants/portal_partials/reports.html" %}
{% else %}
{% include "modules/consultants/templates/consultants/portal_partials/overview.html" %}
{% endif %}
</section>
</div>
@@ -0,0 +1,19 @@
<div class="space-y-6">
<section class="grid gap-4 md:grid-cols-3">
<a href="/consultant/managed-clients" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Managed Clients</div>
<p class="mt-2 text-sm text-slate-500">Open consultant-managed clients and prospects.</p>
</a>
<a href="/consultant/service-requests" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Service Requests</div>
<p class="mt-2 text-sm text-slate-500">Track requests raised to the firm.</p>
</a>
<a href="/consultant/service-requests/new" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">New Request</div>
<p class="mt-2 text-sm text-slate-500">Create a new client/service request where permitted.</p>
</a>
</section>
{% include "modules/consultants/templates/consultants/portal_partials/clients.html" %}
{% include "modules/consultants/templates/consultants/portal_partials/service_requests.html" %}
</div>
@@ -0,0 +1,19 @@
<div class="space-y-6">
<section class="grid gap-4 md:grid-cols-3">
<a href="/consultant/documents" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Document Centre</div>
<p class="mt-2 text-sm text-slate-500">Open engagement and permanent documents shared with consultant.</p>
</a>
<a href="/consultant/communications" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Clarifications</div>
<p class="mt-2 text-sm text-slate-500">Read firm queries and consultant replies.</p>
</a>
<a href="/alerts" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Communication Alerts</div>
<p class="mt-2 text-sm text-slate-500">View recent alerts linked to documents and communications.</p>
</a>
</section>
{% include "modules/consultants/templates/consultants/portal_partials/documents.html" %}
{% include "modules/consultants/templates/consultants/portal_partials/clarifications.html" %}
</div>
@@ -0,0 +1,18 @@
<div class="space-y-6">
<section class="grid gap-4 md:grid-cols-3">
<a href="/consultant/work" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Assigned Work Board</div>
<p class="mt-2 text-sm text-slate-500">Open consultant-visible task columns and assignment details.</p>
</a>
<a href="/consultant/workspace" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Workspace Usage</div>
<p class="mt-2 text-sm text-slate-500">View consultant workspace, usage alerts and plan limits.</p>
</a>
<a href="/alerts" class="rounded-3xl border border-slate-200 bg-white p-5 shadow-soft hover:border-brand-300">
<div class="text-sm font-semibold text-slate-900">Alerts</div>
<p class="mt-2 text-sm text-slate-500">Check task and communication alerts shared by the firm.</p>
</a>
</section>
{% include "modules/consultants/templates/consultants/portal_partials/assigned_work.html" %}
</div>
+1
View File
@@ -1401,6 +1401,7 @@ def _build_consultant_portal_payload(db, consultant) -> dict:
return payload
@portal_router.get("/dashboard")
def consultant_dashboard(request: Request, tab: str = "overview"):
db = CommonSessionLocal()