Import ClientFlow production v4928.1.5.132.4
This commit is contained in:
@@ -4,6 +4,7 @@ Moved from app.admin_dashboard in v4.7.2. The handlers still reuse
|
||||
legacy helpers to keep this refactor behavior-preserving.
|
||||
"""
|
||||
from fastapi import APIRouter
|
||||
from urllib.parse import quote
|
||||
import app.admin_dashboard as legacy
|
||||
from app.admin_dashboard import * # noqa: F401,F403
|
||||
|
||||
@@ -117,9 +118,11 @@ async def order_detail_page(opportunity_id: str):
|
||||
if not material_rows:
|
||||
material_rows = f'<tr><td colspan="4" class="text-center text-secondary py-4">Sem produtos definidos. <a href="/opportunities/{esc(opportunity_id)}">Adicionar na oportunidade</a>.</td></tr>'
|
||||
|
||||
return_to = f"/orders/{opportunity_id}"
|
||||
task_rows = ""
|
||||
for task in tasks:
|
||||
task_rows += f'<li><a class="cf-row-link" href="/tasks/{esc(task.get("id"))}">{esc(action_label(task.get("action_code")))}</a> · {status_badge(task.get("status"))}</li>'
|
||||
task_href = f"/tasks/{esc(task.get('id'))}?return_to={quote(return_to, safe='')}"
|
||||
task_rows += f'<li><a class="cf-row-link" href="{esc(task_href)}">{esc(action_label(task.get("action_code")))}</a> · {status_badge(task.get("status"))}</li>'
|
||||
if not task_rows:
|
||||
task_rows = '<li class="text-secondary">Sem tarefas associadas.</li>'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user