refactor(task-list): enhance task row components with depth handling
- Added depth and maxDepth props to TaskRow, TaskRowWithSubtasks, and TitleColumn components to manage nested subtasks more effectively. - Updated AddSubtaskRow to support depth for proper indentation and visual hierarchy. - Improved styling for subtasks based on their depth level, ensuring better visual distinction. - Adjusted task management slice to utilize actual subtask counts from the backend for accurate display.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useSocket } from '@/socket/socketContext';
|
||||
import { ITaskPhase } from '@/types/tasks/taskPhase.types';
|
||||
import { IProjectTask } from '@/types/project/projectTasksViewModel.types';
|
||||
import { Select } from 'antd';
|
||||
|
||||
import { Form } from 'antd';
|
||||
@@ -27,12 +26,6 @@ const TaskDrawerPhaseSelector = ({ phases, task }: TaskDrawerPhaseSelectorProps)
|
||||
phase_id: value,
|
||||
parent_task: task.parent_task_id || null,
|
||||
});
|
||||
|
||||
// socket?.once(SocketEvents.TASK_PHASE_CHANGE.toString(), () => {
|
||||
// if(list.getCurrentGroup().value === this.list.GROUP_BY_PHASE_VALUE && this.list.isSubtasksIncluded) {
|
||||
// this.list.emitRefreshSubtasksIncluded();
|
||||
// }
|
||||
// });
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -41,8 +34,11 @@ const TaskDrawerPhaseSelector = ({ phases, task }: TaskDrawerPhaseSelectorProps)
|
||||
allowClear
|
||||
placeholder="Select Phase"
|
||||
options={phaseMenuItems}
|
||||
style={{ width: 'fit-content' }}
|
||||
dropdownStyle={{ width: 'fit-content' }}
|
||||
styles={{
|
||||
root: {
|
||||
width: 'fit-content',
|
||||
},
|
||||
}}
|
||||
onChange={handlePhaseChange}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user