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