fix(dashboard): forward removeDependencyReferences flag in deleteTask
useTasks.deleteTask had a single-arg signature and dropped the options object, so the modal's "remove dependency references" confirmation flag never reached the API and deletion still failed with TASK_HAS_DEPENDENTS. Forward options through the hook and widen the matching taskOperations.deleteTask type in AppModals. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -345,8 +345,11 @@ export function useTasks(options?: UseTasksOptions) {
|
||||
return normalizeTask(await api.pauseTask(id, projectId));
|
||||
}, [projectId]);
|
||||
|
||||
const deleteTask = useCallback(async (id: string): Promise<Task> => {
|
||||
return normalizeTask(await api.deleteTask(id, projectId));
|
||||
const deleteTask = useCallback(async (
|
||||
id: string,
|
||||
options?: { removeDependencyReferences?: boolean },
|
||||
): Promise<Task> => {
|
||||
return normalizeTask(await api.deleteTask(id, projectId, options));
|
||||
}, [projectId]);
|
||||
|
||||
const mergeTask = useCallback(async (id: string): Promise<MergeResult> => {
|
||||
|
||||
Reference in New Issue
Block a user