Integrate audit checklist responses into service tasks
This commit is contained in:
@@ -47,6 +47,30 @@
|
||||
<textarea name="description" rows="4" class="w-full rounded-xl border border-slate-300 px-4 py-2 text-sm">{{ task.description or '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="md:col-span-2 rounded-2xl border border-emerald-200 bg-emerald-50 p-4">
|
||||
<div class="text-sm font-semibold text-emerald-950">Structured Checklist Response</div>
|
||||
<p class="mt-1 text-xs text-emerald-800">Configure this task as an auditable checklist item. Normal tasks can keep Response Type as None.</p>
|
||||
<div class="mt-3 grid gap-4 md:grid-cols-2">
|
||||
<div>
|
||||
<label class="mb-1 block text-xs font-semibold uppercase tracking-wide text-emerald-800">Task Category</label>
|
||||
<input type="text" name="task_category" value="{{ task.task_category or '' }}" class="w-full rounded-xl border border-emerald-200 px-3 py-2 text-sm" placeholder="e.g. Accounting Verification">
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-1 block text-xs font-semibold uppercase tracking-wide text-emerald-800">Response Type</label>
|
||||
<select name="response_type" class="w-full rounded-xl border border-emerald-200 px-3 py-2 text-sm">
|
||||
{% for value, label in [('NONE','None'),('YES_NO_NA','Yes / No / NA'),('YES_NO','Yes / No'),('TEXT','Text'),('NUMBER','Number'),('DATE','Date')] %}
|
||||
<option value="{{ value }}" {% if (task.response_type or 'NONE') == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 grid gap-3 text-sm text-slate-700 md:grid-cols-3">
|
||||
<label class="inline-flex items-center gap-2"><input type="checkbox" name="response_required" {% if task.response_required %}checked{% endif %}> Response required</label>
|
||||
<label class="inline-flex items-center gap-2"><input type="checkbox" name="evidence_required" {% if task.evidence_required %}checked{% endif %}> Evidence required</label>
|
||||
<label class="inline-flex items-center gap-2"><input type="checkbox" name="remarks_required_if_no" {% if task.remarks_required_if_no %}checked{% endif %}> Remarks required if No</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md:col-span-2 rounded-2xl border border-indigo-200 bg-indigo-50 p-4">
|
||||
<div class="text-sm font-semibold text-indigo-950">AQMM / Quality Control Tagging</div>
|
||||
<p class="mt-1 text-xs text-indigo-800">Use these only for tasks that should become part of the assurance engagement quality checklist. Non-assurance engagements will continue using the normal task flow.</p>
|
||||
|
||||
@@ -47,6 +47,30 @@
|
||||
<textarea name="description" rows="4" class="w-full rounded-xl border border-slate-300 px-4 py-2 text-sm">{{ task.description or '' }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="md:col-span-2 rounded-2xl border border-emerald-200 bg-emerald-50 p-4">
|
||||
<div class="text-sm font-semibold text-emerald-950">Structured Checklist Response</div>
|
||||
<p class="mt-1 text-xs text-emerald-800">Configure this task as an auditable checklist item. Normal tasks can keep Response Type as None.</p>
|
||||
<div class="mt-3 grid gap-4 md:grid-cols-2">
|
||||
<div>
|
||||
<label class="mb-1 block text-xs font-semibold uppercase tracking-wide text-emerald-800">Task Category</label>
|
||||
<input type="text" name="task_category" value="{{ task.task_category or '' }}" class="w-full rounded-xl border border-emerald-200 px-3 py-2 text-sm" placeholder="e.g. Accounting Verification">
|
||||
</div>
|
||||
<div>
|
||||
<label class="mb-1 block text-xs font-semibold uppercase tracking-wide text-emerald-800">Response Type</label>
|
||||
<select name="response_type" class="w-full rounded-xl border border-emerald-200 px-3 py-2 text-sm">
|
||||
{% for value, label in [('NONE','None'),('YES_NO_NA','Yes / No / NA'),('YES_NO','Yes / No'),('TEXT','Text'),('NUMBER','Number'),('DATE','Date')] %}
|
||||
<option value="{{ value }}" {% if (task.response_type or 'NONE') == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 grid gap-3 text-sm text-slate-700 md:grid-cols-3">
|
||||
<label class="inline-flex items-center gap-2"><input type="checkbox" name="response_required" {% if task.response_required %}checked{% endif %}> Response required</label>
|
||||
<label class="inline-flex items-center gap-2"><input type="checkbox" name="evidence_required" {% if task.evidence_required %}checked{% endif %}> Evidence required</label>
|
||||
<label class="inline-flex items-center gap-2"><input type="checkbox" name="remarks_required_if_no" {% if task.remarks_required_if_no %}checked{% endif %}> Remarks required if No</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="md:col-span-2 rounded-2xl border border-indigo-200 bg-indigo-50 p-4">
|
||||
<div class="text-sm font-semibold text-indigo-950">AQMM / Quality Control Tagging</div>
|
||||
<p class="mt-1 text-xs text-indigo-800">Use these only for tasks that should become part of the assurance engagement quality checklist. Non-assurance engagements will continue using the normal task flow.</p>
|
||||
|
||||
@@ -54,6 +54,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if request.query_params.get('checklist_error') %}
|
||||
<div class="mt-4 rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800">The task could not be completed. Enter the required checklist response, remarks and evidence.</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" class="mt-6 grid gap-5 md:grid-cols-2">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<div>
|
||||
@@ -82,6 +86,55 @@
|
||||
{% if not can_reassign and task.assigned_to %}<p class="mt-1 text-xs text-slate-500">Assignee changes are restricted for this role.</p>{% endif %}
|
||||
{% if can_edit and not can_manage_fields %}<p class="mt-1 text-xs text-slate-500">You can update status and work note only for your own assigned task.</p>{% endif %}
|
||||
</div>
|
||||
{% if (task.response_type or 'NONE') != 'NONE' or task.response_required or task.evidence_required %}
|
||||
<div class="md:col-span-2 rounded-2xl border border-emerald-200 bg-emerald-50 p-4">
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div>
|
||||
<div class="text-sm font-semibold text-emerald-950">Checklist Response</div>
|
||||
<p class="mt-1 text-xs text-emerald-800">{{ task.task_category or 'Verification' }}{% if task.response_required %} · Response required{% endif %}{% if task.evidence_required %} · Evidence required{% endif %}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 grid gap-4 md:grid-cols-2">
|
||||
{% if task.response_type == 'YES_NO_NA' %}
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Response</label>
|
||||
<select name="checklist_response" class="w-full rounded-xl border border-emerald-200 px-4 py-2 text-sm" {% if not can_edit %}disabled{% endif %}>
|
||||
<option value="">Select</option>
|
||||
{% for value in ['YES','NO','NA'] %}<option value="{{ value }}" {% if task.checklist_response == value %}selected{% endif %}>{{ value.replace('_',' ').title() }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% elif task.response_type == 'YES_NO' %}
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Response</label>
|
||||
<select name="checklist_response" class="w-full rounded-xl border border-emerald-200 px-4 py-2 text-sm" {% if not can_edit %}disabled{% endif %}>
|
||||
<option value="">Select</option>
|
||||
{% for value in ['YES','NO'] %}<option value="{{ value }}" {% if task.checklist_response == value %}selected{% endif %}>{{ value.title() }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% elif task.response_type == 'TEXT' %}
|
||||
<div class="md:col-span-2">
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Response</label>
|
||||
<textarea name="checklist_text_response" rows="3" class="w-full rounded-xl border border-emerald-200 px-4 py-2 text-sm" {% if not can_edit %}readonly{% endif %}>{{ task.checklist_text_response or '' }}</textarea>
|
||||
</div>
|
||||
{% elif task.response_type == 'NUMBER' %}
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Numeric Response</label>
|
||||
<input type="number" step="0.01" name="checklist_number_response" value="{{ task.checklist_number_response if task.checklist_number_response is not none else '' }}" class="w-full rounded-xl border border-emerald-200 px-4 py-2 text-sm" {% if not can_edit %}readonly{% endif %}>
|
||||
</div>
|
||||
{% elif task.response_type == 'DATE' %}
|
||||
<div>
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Date Response</label>
|
||||
<input type="date" name="checklist_date_response" value="{{ task.checklist_date_response or '' }}" class="w-full rounded-xl border border-emerald-200 px-4 py-2 text-sm" {% if not can_edit %}readonly{% endif %}>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="{% if task.response_type == 'TEXT' %}md:col-span-2{% endif %}">
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Checklist Remarks{% if task.remarks_required_if_no %} (required when No){% endif %}</label>
|
||||
<textarea name="checklist_remarks" rows="3" class="w-full rounded-xl border border-emerald-200 px-4 py-2 text-sm" {% if not can_edit %}readonly{% endif %}>{{ task.checklist_remarks or '' }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="md:col-span-2">
|
||||
<label class="mb-2 block text-sm font-medium text-slate-700">Remarks / Work Note</label>
|
||||
<textarea name="remarks" rows="4" class="w-full rounded-xl border border-slate-300 px-4 py-2 text-sm" {% if not can_edit %}readonly{% endif %}>{{ task.remarks or '' }}</textarea>
|
||||
|
||||
Reference in New Issue
Block a user