feat: show feishu notification status
This commit is contained in:
@@ -8,6 +8,7 @@ from django.views.decorators.http import require_http_methods
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from review_agent.models import FileSummaryBatch, RegulatoryReviewBatch, WorkflowNodeRun
|
||||
from review_agent.notifications.presenter import serialize_notification_records
|
||||
from review_agent.regulatory_review.events import record_event
|
||||
from review_agent.regulatory_review.services.info_extract import ensure_regulatory_condition_candidates
|
||||
from review_agent.regulatory_review.services.rectification_review import review_missing_issues
|
||||
@@ -25,6 +26,7 @@ def batch_status(request, batch_id: int):
|
||||
workflow_type="regulatory_review",
|
||||
workflow_batch_id=batch.pk,
|
||||
).order_by("id")
|
||||
notifications = serialize_notification_records("regulatory_review", batch.pk)
|
||||
payload = {
|
||||
"batch": {
|
||||
"id": batch.pk,
|
||||
@@ -46,6 +48,8 @@ def batch_status(request, batch_id: int):
|
||||
}
|
||||
for node in nodes
|
||||
],
|
||||
"notifications": notifications,
|
||||
"latest_notification": notifications[0] if notifications else None,
|
||||
}
|
||||
if batch.status == RegulatoryReviewBatch.Status.WAITING_USER and condition_candidates:
|
||||
payload["condition_confirmation"] = {
|
||||
|
||||
Reference in New Issue
Block a user