Merge branch 'release/v2.0.4' of https://github.com/Worklenz/worklenz into fix/WB-705-task-list-timer-cell
This commit is contained in:
@@ -166,7 +166,7 @@ const EnhancedKanbanCreateSubtaskCard = ({
|
||||
onKeyUp={e => e.stopPropagation()}
|
||||
onKeyPress={e => e.stopPropagation()}
|
||||
onBlur={handleInputBlur}
|
||||
placeholder={t('kanbanBoard.addSubTaskPlaceholder')}
|
||||
placeholder={t('newSubtaskNamePlaceholder')}
|
||||
className={`enhanced-kanban-create-subtask-input ${themeMode === 'dark' ? 'dark' : ''}`}
|
||||
disabled={creatingTask}
|
||||
autoFocus
|
||||
|
||||
@@ -89,12 +89,7 @@ const EnhancedKanbanCreateTaskCard: React.FC<EnhancedKanbanCreateTaskCardProps>
|
||||
|
||||
// Real-time socket event handler
|
||||
const eventHandler = (task: IProjectTask) => {
|
||||
dispatch(
|
||||
addTaskToGroup({
|
||||
sectionId,
|
||||
task: { ...task, id: task.id || nanoid(), name: task.name || newTaskName.trim() },
|
||||
})
|
||||
);
|
||||
// Only reset the form - the global handler will add the task to Redux
|
||||
socket?.off(SocketEvents.QUICK_TASK.toString(), eventHandler);
|
||||
resetForNextTask();
|
||||
};
|
||||
|
||||
@@ -12,7 +12,10 @@ import { deleteStatusToggleDrawer } from '@/features/projects/status/DeleteStatu
|
||||
import { Drawer, Alert, Card, Select, Button, Typography, Badge } from 'antd';
|
||||
import { DownOutlined } from '@ant-design/icons';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { deleteSection, IGroupBy } from '@features/board/board-slice';
|
||||
import {
|
||||
deleteSection,
|
||||
IGroupBy,
|
||||
} from '@features/enhanced-kanban/enhanced-kanban.slice';
|
||||
import { statusApiService } from '@/api/taskAttributes/status/status.api.service';
|
||||
import { phasesApiService } from '@/api/taskAttributes/phases/phases.api.service';
|
||||
import logger from '@/utils/errorLogger';
|
||||
@@ -28,7 +31,7 @@ const DeleteStatusDrawer: React.FC = () => {
|
||||
const { projectView } = useTabSearchParam();
|
||||
const [form] = Form.useForm();
|
||||
const { t } = useTranslation('task-list-filters');
|
||||
const { editableSectionId, groupBy } = useAppSelector(state => state.boardReducer);
|
||||
const { editableSectionId, groupBy } = useAppSelector(state => state.enhancedKanbanReducer);
|
||||
const isDelteStatusDrawerOpen = useAppSelector(
|
||||
state => state.deleteStatusReducer.isDeleteStatusDrawerOpen
|
||||
);
|
||||
|
||||
@@ -101,6 +101,7 @@ interface EnhancedKanbanState {
|
||||
selectedTaskIds: string[];
|
||||
expandedSubtasks: Record<string, boolean>;
|
||||
columnOrder: string[];
|
||||
editableSectionId: string | null;
|
||||
}
|
||||
|
||||
const initialState: EnhancedKanbanState = {
|
||||
@@ -141,6 +142,7 @@ const initialState: EnhancedKanbanState = {
|
||||
selectedTaskIds: [],
|
||||
expandedSubtasks: {},
|
||||
columnOrder: [],
|
||||
editableSectionId: null,
|
||||
};
|
||||
|
||||
// Performance monitoring utility
|
||||
@@ -893,6 +895,19 @@ const enhancedKanbanSlice = createSlice({
|
||||
state.groupCache[result.groupId] = result.group;
|
||||
}
|
||||
},
|
||||
|
||||
setEditableSection: (state, action: PayloadAction<string | null>) => {
|
||||
state.editableSectionId = action.payload;
|
||||
},
|
||||
|
||||
deleteSection: (state, action: PayloadAction<{ sectionId: string }>) => {
|
||||
state.taskGroups = state.taskGroups.filter(
|
||||
section => section.id !== action.payload.sectionId
|
||||
);
|
||||
if (state.editableSectionId === action.payload.sectionId) {
|
||||
state.editableSectionId = null;
|
||||
}
|
||||
},
|
||||
},
|
||||
extraReducers: builder => {
|
||||
builder
|
||||
@@ -1087,6 +1102,8 @@ export const {
|
||||
updateEnhancedKanbanTaskStartDate,
|
||||
updateEnhancedKanbanSubtask,
|
||||
toggleTaskExpansion,
|
||||
setEditableSection,
|
||||
deleteSection,
|
||||
} = enhancedKanbanSlice.actions;
|
||||
|
||||
export default enhancedKanbanSlice.reducer;
|
||||
|
||||
Reference in New Issue
Block a user