清除“Task”模块

This commit is contained in:
Cheng Zhou
2025-12-19 11:02:21 +08:00
parent 81412fe906
commit b475d4f763
30 changed files with 58 additions and 1090 deletions
+1 -6
View File
@@ -1,5 +1,5 @@
import { apiGet } from "./axios";
import type { ApiListResponse, Study, UserInfo } from "../types/api";
import type { ApiListResponse } from "../types/api";
export const fetchProgress = (studyId: string) =>
apiGet(`/api/v1/studies/${studyId}/dashboard/progress`);
@@ -12,8 +12,3 @@ export const fetchOverdueAesCount = (studyId: string) =>
export const fetchOverdueQueriesCount = (studyId: string) =>
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/data-queries/`, { params: { overdue: true, limit: 1 } });
export const fetchMyTodoTasks = (studyId: string, assigneeId: string) =>
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/tasks/`, {
params: { assignee_id: assigneeId, status: "TODO" },
});
-11
View File
@@ -1,11 +0,0 @@
import { apiGet, apiPost, apiPatch } from "./axios";
import type { ApiListResponse } from "../types/api";
export const fetchTasks = (studyId: string, params?: Record<string, any>) =>
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/tasks/`, { params });
export const createTask = (studyId: string, payload: Record<string, any>) =>
apiPost(`/api/v1/studies/${studyId}/tasks/`, payload);
export const updateTask = (studyId: string, taskId: string, payload: Record<string, any>) =>
apiPatch(`/api/v1/studies/${studyId}/tasks/${taskId}`, payload);