Improve employee and partner engagement workspace
This commit is contained in:
@@ -14,6 +14,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% set engagement_id = engagement.id %}
|
||||
{% set return_to = '/partner/engagements/' ~ engagement.id %}
|
||||
{% include "modules/services/templates/services/engagements/_engagement_resources.html" %}
|
||||
|
||||
<div class="grid gap-6 xl:grid-cols-[minmax(0,1fr)_360px]">
|
||||
<section class="space-y-4">
|
||||
{% for task in tasks %}
|
||||
|
||||
@@ -19,6 +19,7 @@ from app.modules.documents.models import EngagementDocument
|
||||
from app.modules.clients.models import Client, ClientBranch, ClientBusinessUnit
|
||||
from app.modules.registrations.models import ClientRegistration, RegistrationType
|
||||
from app.modules.services.execution import CLOSED_TASK_STATUSES, TASK_PRIORITIES, TASK_STATUSES
|
||||
from app.modules.services.engagement_resources import build_engagement_resource_context
|
||||
from app.modules.services.models import (
|
||||
ClientServiceSubscription,
|
||||
ClientServiceTaskInstance,
|
||||
@@ -709,11 +710,13 @@ def partner_engagement_detail(request: Request, engagement_id: int):
|
||||
_decorate_task(task, today)
|
||||
documents = db.execute(
|
||||
select(EngagementDocument)
|
||||
.options(selectinload(EngagementDocument.versions))
|
||||
.where(EngagementDocument.engagement_id == engagement.id, EngagementDocument.is_deleted.is_(False))
|
||||
.order_by(EngagementDocument.updated_at_utc.desc(), EngagementDocument.id.desc())
|
||||
).scalars().all()
|
||||
engagement.display_label = _engagement_label(engagement)
|
||||
return _render(request, "modules/partners/templates/partners/engagement_detail.html", db, current_user, title="Partner Engagement Review", engagement=engagement, tasks=tasks, documents=documents, errors=[], financial_year=financial_year)
|
||||
resources = build_engagement_resource_context(db, engagement, tasks, documents)
|
||||
return _render(request, "modules/partners/templates/partners/engagement_detail.html", db, current_user, title="Partner Engagement Review", engagement=engagement, tasks=tasks, documents=documents, resources=resources, errors=[], financial_year=financial_year)
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user