From b500c801ee27c91739c3adf02020d3d1e2efb4fa Mon Sep 17 00:00:00 2001 From: shancds Date: Mon, 7 Jul 2025 10:11:56 +0530 Subject: [PATCH] refactor(KanbanGroup, TaskCard): simplify card creation logic and enhance drag-and-drop functionality - Removed conditional checks for user roles when displaying the new task card options in KanbanGroup, streamlining the UI for task creation. - Updated TaskCard component to improve the drag-and-drop indicator styling and structure, enhancing the user experience during task interactions. --- .../EnhancedKanbanBoardNativeDnD/KanbanGroup.tsx | 6 +++--- .../EnhancedKanbanBoardNativeDnD/TaskCard.tsx | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/worklenz-frontend/src/components/enhanced-kanban/EnhancedKanbanBoardNativeDnD/KanbanGroup.tsx b/worklenz-frontend/src/components/enhanced-kanban/EnhancedKanbanBoardNativeDnD/KanbanGroup.tsx index 190d5d84..6a38af8b 100644 --- a/worklenz-frontend/src/components/enhanced-kanban/EnhancedKanbanBoardNativeDnD/KanbanGroup.tsx +++ b/worklenz-frontend/src/components/enhanced-kanban/EnhancedKanbanBoardNativeDnD/KanbanGroup.tsx @@ -434,7 +434,7 @@ const KanbanGroup: React.FC = memo(({ )}
{/* Create card at top */} - {showNewCardTop && (isOwnerOrAdmin || isProjectManager) && ( + {showNewCardTop && ( = memo(({ ))} {/* Create card at bottom */} - {showNewCardBottom && (isOwnerOrAdmin || isProjectManager) && ( + {showNewCardBottom && ( = memo(({ )} {/* Footer Add Task Button */} - {(isOwnerOrAdmin || isProjectManager) && !showNewCardTop && !showNewCardBottom && group.tasks.length > 0 && ( + {!showNewCardTop && !showNewCardBottom && group.tasks.length > 0 && (