Separate normal task review from AQMM review

This commit is contained in:
A R R R Associates
2026-08-11 09:05:09 +05:30
parent 20fd30ff3d
commit c3684b7afa
17 changed files with 435 additions and 98 deletions
+18 -9
View File
@@ -15,7 +15,7 @@ from app.modules.manager_dashboard.service import (
get_manager_review_workspace,
get_next_manager_review_task_id,
)
from app.modules.services.execution import apply_task_review
from app.modules.services.execution import apply_normal_task_review, apply_task_review
from app.modules.alerts.workflow_escalations import update_workflow_escalation
router = APIRouter(prefix="/manager", tags=["manager-dashboard-v2-ui"])
@@ -160,14 +160,23 @@ def manager_review_task_submit(
if not task:
return RedirectResponse(url="/manager/dashboard?tab=review-queue", status_code=303)
try:
apply_task_review(
db,
task=task,
review_level="manager",
decision=decision,
note=review_note,
user_id=current_user.id,
)
if active.get("review_kind") == "normal":
apply_normal_task_review(
db,
task=task,
decision=decision,
note=review_note,
user_id=current_user.id,
)
else:
apply_task_review(
db,
task=task,
review_level="manager",
decision=decision,
note=review_note,
user_id=current_user.id,
)
db.commit()
except ValueError:
db.rollback()