Step F3:项目 Dashboard

This commit is contained in:
Cheng Zhou
2025-12-16 20:37:30 +08:00
parent cc54d80b3a
commit ed25d93fcd
12 changed files with 395 additions and 4 deletions
+19
View File
@@ -0,0 +1,19 @@
import { apiGet } from "./axios";
import type { ApiListResponse, Study, UserInfo } from "../types/api";
export const fetchProgress = (studyId: string) =>
apiGet(`/api/v1/studies/${studyId}/dashboard/progress`);
export const fetchFinanceSummary = (studyId: string) =>
apiGet(`/api/v1/studies/${studyId}/finance/summary`);
export const fetchOverdueAesCount = (studyId: string) =>
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/aes`, { params: { overdue: true, limit: 1 } });
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" },
});