ops bot: task lists go out one card per task with Сделано / Перенести buttons
This commit is contained in:
@@ -55,6 +55,16 @@ def tree(nodes: list, depth: int = 0) -> list[str]:
|
||||
return out
|
||||
|
||||
|
||||
def task_line(t: dict, depth: int, today: date) -> str:
|
||||
"""One task as a standalone card text (sent as its own message with buttons)."""
|
||||
mark = "⏱" if t["running"] else ("▶️" if t["status"] == "doing" else "📌")
|
||||
due = f"\nСрок: {human_day(t['due'], today)}" if t["due"] else ""
|
||||
mins = f"\nУчтено: {t['minutes']} мин" if t["minutes"] else ""
|
||||
client = f" [{client_name(t['client'])}]" if t["client"] else ""
|
||||
indent = "└ " * depth
|
||||
return f"{indent}{mark} <b>{escape(t['title'])}</b>{client}{due}{mins}"
|
||||
|
||||
|
||||
def subs(rows: list, by_client: dict, today: date) -> str:
|
||||
"""Grouped by company, each with its monthly total."""
|
||||
if not rows:
|
||||
|
||||
Reference in New Issue
Block a user