Improve project-task integration and sub-task support

- TasksApi: add getSubTasks(parentId) + parentId param to create()
- TasksRepository: expose new API methods
- app.dart: invalidate projectsProvider + projectMilestonesProvider
  after quick capture creates a task; taskNew route reads ?projectId=
  query param and passes as initialProjectId to TaskEditScreen
- project_list_screen.dart: _AddTaskRow passes projectId query param
  so the task editor pre-fills the project on navigation
- task_edit_screen.dart: fully rewritten with initialProjectId support,
  sub-task fetching/creation, and _SubTasksSection widget

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 21:59:58 -05:00
parent 868cb0e49e
commit 3c3055d536
5 changed files with 261 additions and 74 deletions
@@ -493,7 +493,7 @@ class _AddTaskRow extends StatelessWidget {
return Padding(
padding: const EdgeInsets.fromLTRB(48, 4, 16, 8),
child: TextButton.icon(
onPressed: () => context.push(Routes.taskNew),
onPressed: () => context.push('${Routes.taskNew}?projectId=${project.id}'),
icon: const Icon(Icons.add, size: 16),
label: const Text('New task'),
style: TextButton.styleFrom(