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.
This commit is contained in:
@@ -203,16 +203,18 @@ const TaskCard: React.FC<TaskCardProps> = memo(({
|
||||
<>
|
||||
{isDropIndicator && (
|
||||
<div
|
||||
style={{
|
||||
|
||||
onDragStart={e => onTaskDragStart(e, task.id!, groupId)}
|
||||
onDragOver={e => onTaskDragOver(e, groupId, idx)}
|
||||
onDrop={e => onTaskDrop(e, groupId, idx)}
|
||||
>
|
||||
<div className="w-full h-full bg-red-500"style={{
|
||||
height: 80,
|
||||
background: themeMode === 'dark' ? '#2a2a2a' : '#f0f0f0',
|
||||
borderRadius: 6,
|
||||
border: `5px`
|
||||
}}
|
||||
onDragStart={e => onTaskDragStart(e, task.id!, groupId)}
|
||||
onDragOver={e => onTaskDragOver(e, groupId, idx)}
|
||||
onDrop={e => onTaskDrop(e, groupId, idx)}
|
||||
/>
|
||||
}}></div>
|
||||
</div>
|
||||
)}
|
||||
<div className="enhanced-kanban-task-card" style={{ background, color, display: 'block' }} >
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user