feat(FN-5475): add allow-resurrection control to task delete flow
Implements the allow-resurrection toggle for task deletion, letting users prevent deleted tasks from being automatically restored. Changes span the `ConfirmDialog` component, `TaskDetailModal`, and the `useConfirm` hook, with comprehensive test coverage across the dashboard API and UI layers. Fusion-Task-Id: FN-5475 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> Fusion-Task-Id: FN-5475
This commit is contained in:
@@ -111,6 +111,7 @@ export interface DeleteTaskOptions {
|
||||
removeDependencyReferences?: boolean;
|
||||
removeLineageReferences?: boolean;
|
||||
githubIssueAction?: GithubIssueAction;
|
||||
allowResurrection?: boolean;
|
||||
}
|
||||
|
||||
export interface ArchiveTaskOptions {
|
||||
@@ -532,6 +533,10 @@ export function deleteTask(id: string, projectId?: string, options?: DeleteTaskO
|
||||
if (options?.githubIssueAction) {
|
||||
search.set("githubIssueAction", options.githubIssueAction);
|
||||
}
|
||||
// FN-5233 route reads delete modifiers from query params, including allowResurrection.
|
||||
if (options?.allowResurrection) {
|
||||
search.set("allowResurrection", "true");
|
||||
}
|
||||
|
||||
const suffix = search.size > 0 ? `?${search.toString()}` : "";
|
||||
return api<Task>(withProjectId(`/tasks/${id}${suffix}`, projectId), { method: "DELETE" });
|
||||
|
||||
Reference in New Issue
Block a user