From 1f577fc4102eb20da29d66be2e0730c1b2df8607 Mon Sep 17 00:00:00 2001 From: antanst <> Date: Fri, 8 Aug 2025 22:30:27 +0300 Subject: [PATCH] Add confirmation dialog when deleting project. --- frontend/components/Project/ProjectDetails.tsx | 10 ++++++++-- frontend/components/Project/ProjectModal.tsx | 13 ++++++++----- public/locales/en/translation.json | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/frontend/components/Project/ProjectDetails.tsx b/frontend/components/Project/ProjectDetails.tsx index e13307a..26c732d 100644 --- a/frontend/components/Project/ProjectDetails.tsx +++ b/frontend/components/Project/ProjectDetails.tsx @@ -1059,8 +1059,14 @@ const ProjectDetails: React.FC = () => { )} {isConfirmDialogOpen && !noteToDelete && ( setIsConfirmDialogOpen(false)} /> diff --git a/frontend/components/Project/ProjectModal.tsx b/frontend/components/Project/ProjectModal.tsx index 90eb9c8..8f739ec 100644 --- a/frontend/components/Project/ProjectModal.tsx +++ b/frontend/components/Project/ProjectModal.tsx @@ -44,7 +44,7 @@ const ProjectModal: React.FC = ({ name: '', description: '', area_id: null, - active: false, + active: true, tags: [], priority: 'low', due_date_at: null, @@ -80,7 +80,7 @@ const ProjectModal: React.FC = ({ image: false, priority: false, dueDate: false, - active: false, + active: true, }); const { showSuccessToast, showErrorToast } = useToast(); @@ -132,7 +132,7 @@ const ProjectModal: React.FC = ({ name: '', description: '', area_id: null, - active: false, + active: true, tags: [], priority: 'low', due_date_at: null, @@ -904,8 +904,11 @@ const ProjectModal: React.FC = ({ {showConfirmDialog && ( setShowConfirmDialog(false)} /> diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index 014b89f..ccd7019 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -355,7 +355,7 @@ }, "deleteProject": { "title": "Delete Project", - "message": "Are you sure you want to delete the project \"{{projectName}}\"?" + "message": "Deleting this project will remove the project only. All items inside will be retained but will no longer belong to any project. Continue?" } }, "forms": {