Delete VPS document stage after verified local storage sync

This commit is contained in:
A R R R Associates
2026-07-20 15:27:58 +05:30
parent bca72ab2d9
commit 55c5a7acdf
15 changed files with 361 additions and 7 deletions
+16
View File
@@ -16,6 +16,7 @@ from app.modules.partner_dashboard.service import (
get_partner_review_workspace,
)
from app.modules.services.execution import apply_task_review
from app.modules.alerts.workflow_escalations import update_workflow_escalation
router = APIRouter(prefix="/partner", tags=["partner-dashboard-v2-ui"])
@@ -25,6 +26,7 @@ VALID_TABS = {
"clients": "modules/partner_dashboard/templates/partner_dashboard/partials/clients.html",
"staff": "modules/partner_dashboard/templates/partner_dashboard/partials/staff.html",
"review": "modules/partner_dashboard/templates/partner_dashboard/partials/review.html",
"escalations": "modules/partner_dashboard/templates/partner_dashboard/partials/escalations.html",
"billing": "modules/partner_dashboard/templates/partner_dashboard/partials/billing.html",
"reports": "modules/partner_dashboard/templates/partner_dashboard/partials/reports.html",
"wizards": "modules/partner_dashboard/templates/partner_dashboard/partials/wizards.html",
@@ -168,3 +170,17 @@ def partner_review_task_submit(
return RedirectResponse(url=f"/partner/reviews/engagements/{subscription_id}?task_id={task_id}&reviewed=1", status_code=303)
finally:
db.close()
@router.post("/escalations/{escalation_id}/action")
def partner_escalation_action(request: Request, escalation_id: int, action: str = Form(...), resolution_note: str = Form(""), csrf_token: str = Form(...)):
validate_csrf(request, csrf_token)
db=CommonSessionLocal()
try:
current_user=get_current_user(request, db=db)
if not current_user: return RedirectResponse(url="/login",status_code=303)
if not can_access_partner_dashboard(db,current_user): return ui_access_denied()
try: update_workflow_escalation(db, escalation_id=escalation_id, actor_user_id=current_user.id, action=action, resolution_note=resolution_note); db.commit()
except ValueError: db.rollback()
return RedirectResponse(url="/partner/dashboard?tab=escalations",status_code=303)
finally: db.close()