bx-2052-deal-tab #2

Merged
ksenia_mikhailova merged 25 commits from bx-2052-deal-tab into main 2024-11-19 13:59:00 +03:00
2 changed files with 7 additions and 2 deletions
Showing only changes of commit 558033c30b - Show all commits

View File

@ -149,8 +149,10 @@ async def deal_tab(
task_data_json = task_data.json() task_data_json = task_data.json()
# logger.info(task_data_json["result"]["tasks"]) # logger.info(task_data_json["result"]["tasks"])
parts = WEBHOOK.split("/")
domain = f"https://{parts[2]}"
return templates.TemplateResponse( return templates.TemplateResponse(
request=request, name="deal_tab.html", context={"tasks": task_data_json["result"]["tasks"]} request=request, name="deal_tab.html", context={"tasks": task_data_json["result"]["tasks"], "domain":domain}
) )
return {"status": "success", "result": task_data_json} return {"status": "success", "result": task_data_json}

View File

@ -1,8 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Список элементов</title> <title>Список элементов</title>
</head> </head>
<body> <body>
<table> <table>
<tr> <tr>
@ -17,7 +19,7 @@
<tr> <tr>
<td>{{ item.id }}</td> <td>{{ item.id }}</td>
<td> <td>
<a href="/workgroups/group/{{item.groupId}}/tasks/task/view/{{item.id}}/"> <a href="{{domain}}/workgroups/group/{{item.groupId}}/tasks/task/view/{{item.id}}/">
{{ item.title }} {{ item.title }}
</a> </a>
</td> </td>
@ -29,4 +31,5 @@
{% endfor %} {% endfor %}
</table> </table>
</body> </body>
</html> </html>