feat: show tasks completed today
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 5m38s

This commit is contained in:
2026-09-15 12:52:43 +08:00
parent d519843a9f
commit ebabb87780
10 changed files with 245 additions and 9 deletions
+2 -1
View File
@@ -1301,7 +1301,7 @@ def _export_payload(folders, lists, tasks, recurrences, habits, countdowns, memo
"exported_at": utcnow().isoformat(),
"folders": [serialize(x, ["id", "name", "position", "deleted_at"]) for x in folders],
"lists": [serialize(x, ["id", "folder_id", "name", "is_inbox", "position", "deleted_at"]) for x in lists],
"tasks": [serialize(x, ["id", "list_id", "parent_id", "title", "description", "priority", "completed", "due_at", "due_has_time", "external_id", "deleted_at"]) for x in tasks],
"tasks": [serialize(x, ["id", "list_id", "parent_id", "title", "description", "priority", "completed", "completed_at", "due_at", "due_has_time", "external_id", "deleted_at"]) for x in tasks],
"recurrences": [serialize(x, ["id", "task_id", "rrule", "starts_at", "ends_at", "trigger_mode", "after_completion_days", "last_completed_at"]) for x in recurrences],
"habits": [serialize(x, ["id", "name", "kind", "target", "max_value", "schedule_type", "weekdays", "month_days", "interval_days", "start_date", "archived_at", "position"]) for x in habits],
"countdowns": [serialize(x, ["id", "title", "event_date", "calendar_mode", "lunar_month", "lunar_day", "ignore_year", "kind", "repeat_rule", "icon", "pinned", "archived_at", "created_at", "updated_at"]) for x in countdowns],
@@ -1487,6 +1487,7 @@ async def restore_json(payload: dict, mode: str = Query("merge", pattern="^(merg
description=raw.get("description", ""),
priority=raw.get("priority", 0),
completed=raw.get("completed", False),
completed_at=datetime.fromisoformat(raw["completed_at"]) if raw.get("completed_at") else None,
due_at=datetime.fromisoformat(raw["due_at"]) if raw.get("due_at") else None,
due_has_time=raw.get("due_has_time", True),
external_id=ext,