From 5827bb7992f25e143212e35384329939d81b6bf2 Mon Sep 17 00:00:00 2001 From: paul-nothaft <40865108-paul-nothaft@users.noreply.replit.com> Date: Thu, 11 Sep 2025 15:27:36 +0000 Subject: [PATCH] Allow users to add and edit tasks within projects Introduce state and handlers for managing project tasks, enabling users to add, edit, and remove tasks directly within the project creation and editing interfaces. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ceced2fc-aa46-458d-ba87-ddd4b7bb1518 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/659922a9-0087-461c-90dd-6d9a58b81d4d/ceced2fc-aa46-458d-ba87-ddd4b7bb1518/P2PZNJ9 --- .replit | 4 + client/src/components/ProjectTemplate.tsx | 587 +++++++++++++++++++--- 2 files changed, 518 insertions(+), 73 deletions(-) diff --git a/.replit b/.replit index 61099cd..854ae92 100644 --- a/.replit +++ b/.replit @@ -14,6 +14,10 @@ run = ["npm", "run", "start"] localPort = 5000 externalPort = 80 +[[ports]] +localPort = 33729 +externalPort = 3001 + [[ports]] localPort = 35345 externalPort = 3002 diff --git a/client/src/components/ProjectTemplate.tsx b/client/src/components/ProjectTemplate.tsx index 1d9fa54..c2163dd 100644 --- a/client/src/components/ProjectTemplate.tsx +++ b/client/src/components/ProjectTemplate.tsx @@ -101,6 +101,12 @@ export default function ProjectTemplate({ const [isEndDateCalendarOpen, setIsEndDateCalendarOpen] = useState(false); const [closedProjectsFilter, setClosedProjectsFilter] = useState(''); + // Task management state + const [projectTasks, setProjectTasks] = useState([]); + const [isEditingTask, setIsEditingTask] = useState(false); + const [editingTaskIndex, setEditingTaskIndex] = useState(null); + const [taskForm, setTaskForm] = useState>({}); + // Label management state const [isLabelDialogOpen, setIsLabelDialogOpen] = useState(false); const [editingLabel, setEditingLabel] = useState