feat(tasks): implement V3 API for task management and enhance UI components
- Introduced `getTasksV3` and `refreshTaskProgress` methods in `TasksControllerV2` to optimize task retrieval and progress refreshing. - Updated API routes to include new endpoints for V3 task management. - Enhanced frontend components to utilize the new V3 API, improving performance by reducing frontend processing. - Added `VirtualizedTaskList` and `VirtualizedTaskGroup` components for efficient rendering of task lists. - Updated task management slice to support new V3 data structure and improved state management. - Refactored styles for better dark mode support and overall UI consistency.
This commit is contained in:
@@ -30,6 +30,22 @@ export interface ITaskListConfigV2 {
|
||||
isSubtasksInclude: boolean;
|
||||
}
|
||||
|
||||
export interface ITaskListV3Response {
|
||||
groups: Array<{
|
||||
id: string;
|
||||
title: string;
|
||||
groupType: 'status' | 'priority' | 'phase';
|
||||
groupValue: string;
|
||||
collapsed: boolean;
|
||||
tasks: any[];
|
||||
taskIds: string[];
|
||||
color: string;
|
||||
}>;
|
||||
allTasks: any[];
|
||||
grouping: string;
|
||||
totalTasks: number;
|
||||
}
|
||||
|
||||
export const tasksApiService = {
|
||||
getTaskList: async (config: ITaskListConfigV2): Promise<IServerResponse<ITaskListGroup[]>> => {
|
||||
const q = toQueryString(config);
|
||||
@@ -119,4 +135,15 @@ export const tasksApiService = {
|
||||
const response = await apiClient.get(`${rootUrl}/dependency-status${q}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getTaskListV3: async (config: ITaskListConfigV2): Promise<IServerResponse<ITaskListV3Response>> => {
|
||||
const q = toQueryString(config);
|
||||
const response = await apiClient.get(`${rootUrl}/list/v3/${config.id}${q}`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
refreshTaskProgress: async (projectId: string): Promise<IServerResponse<{ message: string }>> => {
|
||||
const response = await apiClient.post(`${rootUrl}/refresh-progress/${projectId}`);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user