From b18e0e4dd7e14f5119eac58fba0c85bd11290038 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Tue, 17 Jun 2025 12:12:27 +0530 Subject: [PATCH] approve condition handle --- src/components/Activities/ReportTaskComments.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Activities/ReportTaskComments.jsx b/src/components/Activities/ReportTaskComments.jsx index c10df7a1..ea826672 100644 --- a/src/components/Activities/ReportTaskComments.jsx +++ b/src/components/Activities/ReportTaskComments.jsx @@ -100,8 +100,13 @@ const ReportTaskComments = ({ setComment((prevItems) => [...prevItems, resp.data]); const taskList = getCachedData("taskList"); - - if (taskList && taskList.data) { + + if ( actionAllow ) + { + + } else + { + if (taskList && taskList.data) { const updatedTaskList = taskList.data.map((task) => { if (task.id === resp.data.taskAllocationId) { const existingComments = Array.isArray(task.comments) @@ -120,6 +125,7 @@ const ReportTaskComments = ({ projectId: taskList.projectId, }); } + } reset(); setloading(false);