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:
shancds
2025-07-17 11:54:33 +05:30
parent fa08463e65
commit 22d2023e2a

View File

@@ -167,7 +167,7 @@ const EnhancedKanbanBoardNativeDnD: React.FC<{ projectId: string }> = ({ project
};
if (groupBy === 'status') update.status_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);
currentSortOrder++;
}
@@ -240,7 +240,6 @@ const EnhancedKanbanBoardNativeDnD: React.FC<{ projectId: string }> = ({ project
if (insertIdx > updatedTasks.length) insertIdx = updatedTasks.length;
updatedTasks.splice(insertIdx, 0, movedTask); // Insert at new position
dispatch(reorderTasks({
activeGroupId: sourceGroup.id,
overGroupId: targetGroup.id,