(header: str, index: int)
| 288 | # ---------- Task helpers ---------- |
| 289 | |
| 290 | def clone_task(header: str, index: int): |
| 291 | if header not in system_data: |
| 292 | return |
| 293 | tasks = system_data[header] |
| 294 | if index < 0 or index >= len(tasks): |
| 295 | return |
| 296 | |
| 297 | title, label, done = tasks[index] |
| 298 | |
| 299 | # Clone task (reset done) |
| 300 | cloned = [f"{title} (copy)", label, False] |
| 301 | |
| 302 | tasks.insert(index + 1, cloned) |
| 303 | save_data(data) |
| 304 | |
| 305 | def toggle_task(header: str, index: int, value: bool): |
| 306 | if header not in system_data: |