Update phase handling in EnhancedKanbanBoardNativeDnD component
- Modified phase update logic to prevent setting phase_id for 'Unmapped' phases, ensuring only valid phases are processed. - Cleaned up unnecessary whitespace in the task reordering section for improved code clarity.
This commit is contained in:
@@ -167,7 +167,7 @@ const EnhancedKanbanBoardNativeDnD: React.FC<{ projectId: string }> = ({ project
|
|||||||
};
|
};
|
||||||
if (groupBy === 'status') update.status_id = group.id;
|
if (groupBy === 'status') update.status_id = group.id;
|
||||||
else if (groupBy === 'priority') update.priority_id = group.id;
|
else if (groupBy === 'priority') update.priority_id = group.id;
|
||||||
else if (groupBy === 'phase') update.phase_id = group.id;
|
else if (groupBy === 'phase' && group.name !== 'Unmapped') update.phase_id = group.id;
|
||||||
taskUpdates.push(update);
|
taskUpdates.push(update);
|
||||||
currentSortOrder++;
|
currentSortOrder++;
|
||||||
}
|
}
|
||||||
@@ -240,7 +240,6 @@ const EnhancedKanbanBoardNativeDnD: React.FC<{ projectId: string }> = ({ project
|
|||||||
if (insertIdx > updatedTasks.length) insertIdx = updatedTasks.length;
|
if (insertIdx > updatedTasks.length) insertIdx = updatedTasks.length;
|
||||||
|
|
||||||
updatedTasks.splice(insertIdx, 0, movedTask); // Insert at new position
|
updatedTasks.splice(insertIdx, 0, movedTask); // Insert at new position
|
||||||
|
|
||||||
dispatch(reorderTasks({
|
dispatch(reorderTasks({
|
||||||
activeGroupId: sourceGroup.id,
|
activeGroupId: sourceGroup.id,
|
||||||
overGroupId: targetGroup.id,
|
overGroupId: targetGroup.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user