feat(custom-columns): enhance task management with custom column support

- Added custom column values to task responses in the API for better task management flexibility.
- Implemented custom column components in the frontend, including dropdowns and date pickers, to improve user interaction.
- Updated TaskListV2 and TaskRow components to handle custom columns, ensuring proper rendering and functionality.
- Introduced a new PeopleDropdown component for selecting team members in custom columns, enhancing usability.
- Enhanced styling for custom column components to support both light and dark modes, improving visual consistency.
This commit is contained in:
chamiakJ
2025-07-07 02:04:05 +05:30
parent c70f8e7b6d
commit 174c6bcedf
11 changed files with 1072 additions and 215 deletions

View File

@@ -25,6 +25,7 @@ import TaskTimeTracking from './TaskTimeTracking';
import { CustomNumberLabel, CustomColordLabel } from '@/components';
import LabelsSelector from '@/components/LabelsSelector';
import TaskPhaseDropdown from '@/components/task-management/task-phase-dropdown';
import { CustomColumnCell } from './components/CustomColumnComponents';
interface TaskRowProps {
taskId: string;
@@ -33,6 +34,10 @@ interface TaskRowProps {
id: string;
width: string;
isSticky?: boolean;
key?: string;
custom_column?: boolean;
custom_column_obj?: any;
isCustom?: boolean;
}>;
isSubtask?: boolean;
updateTaskCustomColumnValue?: (taskId: string, columnKey: string, value: string) => void;
@@ -606,6 +611,19 @@ const TaskRow: React.FC<TaskRowProps> = memo(({ taskId, projectId, visibleColumn
);
default:
// Handle custom columns
const column = visibleColumns.find(col => col.id === columnId);
if (column && (column.custom_column || column.isCustom) && updateTaskCustomColumnValue) {
return (
<div style={baseStyle}>
<CustomColumnCell
column={column}
task={task}
updateTaskCustomColumnValue={updateTaskCustomColumnValue}
/>
</div>
);
}
return null;
}
}, [
@@ -634,6 +652,10 @@ const TaskRow: React.FC<TaskRowProps> = memo(({ taskId, projectId, visibleColumn
// Translation
t,
// Custom columns
visibleColumns,
updateTaskCustomColumnValue,
]);
return (