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:
@@ -15,6 +15,7 @@ class TasksRepository {
|
||||
required TaskPriority priority,
|
||||
DateTime? dueDate,
|
||||
int? projectId,
|
||||
int? parentId,
|
||||
}) =>
|
||||
_api.create(
|
||||
title: title,
|
||||
@@ -23,8 +24,11 @@ class TasksRepository {
|
||||
priority: priority,
|
||||
dueDate: dueDate,
|
||||
projectId: projectId,
|
||||
parentId: parentId,
|
||||
);
|
||||
|
||||
Future<List<Task>> getSubTasks(int parentId) => _api.getSubTasks(parentId);
|
||||
|
||||
Future<Task> update(int id, Map<String, dynamic> fields) =>
|
||||
_api.update(id, fields);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user