Step F4:任务(Task)& 里程碑(Milestone)管理页面
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { apiGet, apiPost, apiPatch } from "./axios";
|
||||
import type { ApiListResponse } from "../types/api";
|
||||
|
||||
export const fetchMilestones = (studyId: string) =>
|
||||
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/milestones/`);
|
||||
|
||||
export const createMilestone = (studyId: string, payload: Record<string, any>) =>
|
||||
apiPost(`/api/v1/studies/${studyId}/milestones/`, payload);
|
||||
|
||||
export const updateMilestone = (studyId: string, milestoneId: string, payload: Record<string, any>) =>
|
||||
apiPatch(`/api/v1/studies/${studyId}/milestones/${milestoneId}`, payload);
|
||||
@@ -0,0 +1,11 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user