20 lines
879 B
TypeScript
20 lines
879 B
TypeScript
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" },
|
|
});
|