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