Align client onboarding documents and engagement AQMM workflow

This commit is contained in:
A R R R Associates
2026-07-11 22:20:26 +05:30
parent a9dda197ad
commit c36f419923
4 changed files with 223 additions and 180 deletions
@@ -12,13 +12,59 @@
</div>
</div>
{% if not request.query_params.get('onboarding') %}
<div class="rounded-2xl border border-sky-200 bg-sky-50 p-4 text-sm text-sky-800">
Permanent documents belong to the client master. Acceptance, independence, conflict, engagement-letter and other AQMM requirements are completed from the applicable engagement according to its Assurance / Non-Assurance classification.
</div>
{% endif %}
{% if request.query_params.get('onboarding') %}
<section class="rounded-2xl border border-indigo-200 bg-indigo-50 p-5 shadow-soft">
<div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
<div>
<div class="text-xs font-semibold uppercase tracking-[0.18em] text-indigo-700">Client Onboarding · Permanent Documents</div>
<h3 class="mt-1 text-lg font-semibold text-indigo-950">Complete the legal/KYC document checklist</h3>
<p class="mt-1 max-w-3xl text-sm text-indigo-800">The client master has been created. Upload the standing documents below using the existing permanent-document, versioning and branch-local-storage workflow. Engagement-specific AQMM formalities are intentionally completed only inside the relevant Assurance / Non-Assurance engagement.</p>
</div>
<div class="shrink-0 rounded-xl bg-white px-4 py-3 text-center shadow-sm">
<div class="text-xs font-semibold uppercase tracking-wide text-slate-500">Onboarding status</div>
<div class="mt-1 text-sm font-semibold {{ 'text-emerald-700' if onboarding_complete else 'text-amber-700' }}">{{ 'Document checklist complete' if onboarding_complete else 'Documents pending' }}</div>
</div>
</div>
<div class="mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3">
{% for item in onboarding_checklist %}
<div class="rounded-xl border px-4 py-3 {{ 'border-emerald-200 bg-emerald-50' if item.complete else 'border-amber-200 bg-white' }}">
<div class="flex items-start gap-3">
<div class="mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold {{ 'bg-emerald-600 text-white' if item.complete else 'bg-amber-100 text-amber-800' }}">{{ '✓' if item.complete else '!' }}</div>
<div>
<div class="text-sm font-semibold text-slate-900">{{ item.label }}</div>
<div class="mt-1 text-xs {{ 'text-emerald-700' if item.complete else 'text-amber-700' }}">{{ 'Uploaded' if item.complete else 'Required to complete onboarding' }}</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="mt-5 flex flex-wrap gap-3">
{% if onboarding_complete %}
<a href="/clients/{{ client.id }}" class="rounded-xl bg-emerald-600 px-4 py-2 text-sm font-semibold text-white hover:bg-emerald-700">Complete Onboarding</a>
{% else %}
<a href="#permanent-upload-form" class="rounded-xl bg-brand-600 px-4 py-2 text-sm font-semibold text-white hover:bg-brand-700">Upload Required Documents</a>
<a href="/clients/{{ client.id }}" class="rounded-xl border border-slate-300 bg-white px-4 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50">Save and Continue Later</a>
{% endif %}
<a href="/services/engagements/new?client_id={{ client.id }}" class="rounded-xl border border-indigo-300 bg-white px-4 py-2 text-sm font-semibold text-indigo-700 hover:bg-indigo-100">Assign Service / Create Engagement</a>
</div>
</section>
{% endif %}
{% if request.query_params.get('uploaded') %}<div class="rounded-2xl border border-emerald-200 bg-emerald-50 p-4 text-sm text-emerald-800">Permanent document uploaded successfully.</div>{% endif %}
{% if request.query_params.get('deleted') %}<div class="rounded-2xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-800">Permanent document archived successfully.</div>{% endif %}
{% if request.query_params.get('download_queued') %}<div class="rounded-2xl border border-sky-200 bg-sky-50 p-4 text-sm text-sky-800">The file is stored in branch local storage. Retrieval request #{{ request.query_params.get('download_queued') }} has been queued.</div>{% endif %}
{% if request.query_params.get('error') %}<div class="rounded-2xl border border-red-200 bg-red-50 p-4 text-sm text-red-800">Action failed. Please check file size, permission and storage path.</div>{% endif %}
{% if can_upload %}
<section class="rounded-2xl bg-white p-5 shadow-soft">
<section id="permanent-upload-form" class="rounded-2xl bg-white p-5 shadow-soft">
<h3 class="text-sm font-semibold text-slate-900">Upload Permanent Document / New Revision</h3>
<form method="post" action="/documents/permanent/clients/{{ client.id }}/upload" enctype="multipart/form-data" class="mt-4 grid gap-4 md:grid-cols-2">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">