diff --git a/archon-ui-main/src/components/project-tasks/TasksTab.tsx b/archon-ui-main/src/components/project-tasks/TasksTab.tsx index 9f65b5e2..73bed79c 100644 --- a/archon-ui-main/src/components/project-tasks/TasksTab.tsx +++ b/archon-ui-main/src/components/project-tasks/TasksTab.tsx @@ -13,6 +13,7 @@ import { WebSocketState } from '../../services/socketIOService'; import { TaskTableView, Task } from './TaskTableView'; import { TaskBoardView } from './TaskBoardView'; import { EditTaskModal } from './EditTaskModal'; +import { DeleteConfirmModal } from '../ui/DeleteConfirmModal'; // Assignee utilities - expanded to include all agent types const ASSIGNEE_OPTIONS = [ @@ -25,69 +26,6 @@ const ASSIGNEE_OPTIONS = [ ] as const; // Delete confirmation modal component -interface DeleteConfirmModalProps { - onConfirm: () => void; - onCancel: () => void; - title: string; - message: string; - confirmText?: string; -} - -const DeleteConfirmModal = ({ - onConfirm, - onCancel, - title, - message, - confirmText = 'Archive' -}: DeleteConfirmModalProps) => { - return ( -
-
- -
-
-
- -
-
-

- {title} -

-

- This action cannot be undone -

-
-
- -

- {message} -

- -
- - -
-
-
-
- ); -}; // Mapping functions for status conversion const mapUIStatusToDBStatus = (uiStatus: Task['status']): DatabaseTaskStatus => { @@ -927,14 +865,13 @@ export const TasksTab = ({ {/* Delete Confirmation Modal */} {showDeleteConfirm && taskToDelete && ( { setTaskToDelete(null); setShowDeleteConfirm(false); }} - title="Archive Task" - message={`Are you sure you want to archive the task "${taskToDelete.title}"? You can restore it from the archived tasks view.`} - confirmText="Archive Task" + type="task" /> )}