{% extends "ui/templates/base/layout.html" %}{% block content %}<div class="space-y-6"><div><h1 class="text-2xl font-semibold">{{task.title}}</h1><a class="text-sm text-brand-600" href="/registrations">← Dashboard</a></div><div class="grid gap-4 lg:grid-cols-3"><div class="rounded-xl border bg-white p-4"><h2 class="font-semibold">Lifecycle work</h2><dl class="mt-3 space-y-2 text-sm"><div><dt class="text-slate-500">Client</dt><dd>{{client.client_name}}</dd></div><div><dt class="text-slate-500">Registration</dt><dd>{{registration_type.name}} — {{registration.registration_number}}</dd></div><div><dt class="text-slate-500">Due</dt><dd>{{task.cycle_due_date}}</dd></div><div><dt class="text-slate-500">Status</dt><dd>{{task.status}}</dd></div></dl></div><div class="rounded-xl border bg-white p-4"><h2 class="font-semibold">Document checklist</h2>{% for d in documents %}<div class="border-b py-2">{{d.document_name}} {% if d.mandatory %}<span class="text-red-600">*</span>{% endif %} — {{d.status}}</div>{% else %}<p class="py-3 text-slate-500">No template requirements.</p>{% endfor %}</div><div class="rounded-xl border bg-white p-4"><h2 class="font-semibold">History</h2>{% for a in actions %}<div class="border-b py-2 text-sm">{{a.action_type|title}} · {{a.completion_date or a.created_at_utc.date()}} · {{a.acknowledgement_number or ''}}</div>{% else %}<p class="py-3 text-slate-500">No completed lifecycle actions.</p>{% endfor %}</div></div>{% if can_manage %}<div class="grid gap-4 lg:grid-cols-2"><form method="post" action="/registrations/tasks/{{task.id}}/status" class="space-y-3 rounded-xl border bg-white p-4"><h2 class="font-semibold">Update progress</h2><input type="hidden" name="csrf_token" value="{{csrf_token}}"><select class="w-full rounded border p-2" name="status"><option>pending</option><option>documents_pending</option><option>prepared</option><option>awaiting_client_approval</option><option>submitted</option><option>query_raised</option><option>under_review</option></select><input class="w-full rounded border p-2" type="date" name="submitted_on"><input class="w-full rounded border p-2" name="acknowledgement_number" placeholder="Acknowledgement number"><textarea class="w-full rounded border p-2" name="notes" placeholder="Notes"></textarea><button class="rounded bg-brand-600 px-3 py-2 text-white">Update</button></form><form method="post" action="/registrations/tasks/{{task.id}}/complete" class="space-y-3 rounded-xl border bg-white p-4"><h2 class="font-semibold">Complete and schedule next cycle</h2><input type="hidden" name="csrf_token" value="{{csrf_token}}"><label class="text-sm">New validity date</label><input class="w-full rounded border p-2" type="date" name="new_valid_until"><input class="w-full rounded border p-2" name="acknowledgement_number" placeholder="Acknowledgement / reference"><textarea class="w-full rounded border p-2" name="notes" placeholder="Completion notes"></textarea><button class="rounded bg-emerald-600 px-3 py-2 text-white">Complete Renewal / Update</button></form></div>{% endif %}</div>{% endblock %}
