Add phase 3 consultant task execution workflow
This commit is contained in:
@@ -22,6 +22,24 @@
|
||||
{% if task.description %}<div class="mt-5 rounded-xl bg-slate-50 p-4 text-sm text-slate-700 whitespace-pre-line">{{ task.description }}</div>{% endif %}
|
||||
</div>
|
||||
|
||||
{% if task.execution_mode == 'consultant' and task.assigned_consultant_id == consultant.id %}
|
||||
<div class="rounded-2xl border border-indigo-200 bg-indigo-50 p-5 shadow-soft">
|
||||
<div class="flex flex-wrap items-start justify-between gap-3">
|
||||
<div><h3 class="font-semibold text-slate-900">Consultant Assignment Execution</h3><p class="mt-1 text-sm text-slate-600">Status: <span class="font-semibold">{{ task.consultant_assignment_status.replace('_',' ').title() }}</span>{% if task.consultant_due_date %} • Due {{ task.consultant_due_date.strftime('%d-%m-%Y') }}{% endif %}</p></div>
|
||||
</div>
|
||||
{% if task.rework_reason %}<div class="mt-3 rounded-xl border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800"><strong>Rework:</strong> {{ task.rework_reason }}</div>{% endif %}
|
||||
<form method="post" action="/consultant/assignments/{{ task.id }}/execution" class="mt-4 space-y-3">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||
<textarea name="note" rows="3" placeholder="Reason for decline or submission note" class="w-full rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm"></textarea>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
{% if task.consultant_assignment_status == 'offered' %}<button name="action" value="accept" class="rounded-xl bg-emerald-600 px-4 py-2 text-sm font-semibold text-white">Accept Assignment</button><button name="action" value="decline" class="rounded-xl border border-red-300 bg-white px-4 py-2 text-sm font-semibold text-red-700">Decline</button>{% endif %}
|
||||
{% if task.consultant_assignment_status in ['accepted','rework_required'] %}<button name="action" value="start" class="rounded-xl bg-brand-600 px-4 py-2 text-sm font-semibold text-white">Start Work</button>{% endif %}
|
||||
{% if task.consultant_assignment_status in ['accepted','in_progress','rework_required'] %}<button name="action" value="submit" class="rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white">Submit for Firm Review</button>{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="rounded-2xl border border-slate-200 bg-white shadow-soft">
|
||||
<div class="border-b border-slate-200 px-5 py-4"><h3 class="font-semibold text-slate-900">Consultant Communication Timeline</h3></div>
|
||||
<div class="divide-y divide-slate-100">
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<div class="mt-3 text-sm font-medium text-slate-800">{{ task.task_name }}</div>
|
||||
<div class="mt-2 flex flex-wrap gap-1 text-[11px] font-semibold">
|
||||
<span class="rounded-full bg-slate-100 px-2 py-1 text-slate-600">{{ task.status.replace('_',' ').title() }}</span>
|
||||
{% if task.execution_mode == 'consultant' and task.assigned_consultant_id == consultant.id %}<span class="rounded-full bg-indigo-50 px-2 py-1 text-indigo-700">Execution: {{ task.consultant_assignment_status.replace('_',' ').title() }}</span>{% endif %}
|
||||
<span class="rounded-full bg-slate-100 px-2 py-1 text-slate-600">{{ task.priority.replace('_',' ').title() }}</span>
|
||||
{% if task.internal_target_date %}<span class="rounded-full bg-slate-100 px-2 py-1 text-slate-600">Due {{ task.internal_target_date.strftime('%d-%m-%Y') }}</span>{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user