fix(kanban-group): update section name handling in status update

- Removed unused section name generation and replaced it with trimmed name input for better consistency.
- Ensured that the updated name is set correctly after a successful status update, improving data integrity.
This commit is contained in:
shancds
2025-07-11 14:06:11 +05:30
parent f2b1262e3d
commit ea37b55078

View File

@@ -108,9 +108,9 @@ const KanbanGroup: React.FC<KanbanGroupProps> = memo(({
const updateStatus = async (category = group.category_id ?? null) => {
if (!category || !projectId || !group.id) return;
const sectionName = getUniqueSectionName(name);
// const sectionName = getUniqueSectionName(name);
const body: ITaskStatusUpdateModel = {
name: sectionName,
name: name.trim(),
project_id: projectId,
category_id: category,
};
@@ -118,7 +118,7 @@ const KanbanGroup: React.FC<KanbanGroupProps> = memo(({
if (res.done) {
dispatch(fetchEnhancedKanbanGroups(projectId));
dispatch(fetchStatuses(projectId));
setName(sectionName);
setName(name.trim());
} else {
setName(editName);
logger.error('Error updating status', res.message);