Step F6:AE & 风险/问题管理(PV)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { apiGet, apiPost, apiPatch } from "./axios";
|
||||
import type { ApiListResponse } from "../types/api";
|
||||
|
||||
export const fetchAes = (studyId: string, params?: Record<string, any>) =>
|
||||
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/aes/`, { params });
|
||||
|
||||
export const createAe = (studyId: string, payload: Record<string, any>) =>
|
||||
apiPost(`/api/v1/studies/${studyId}/aes/`, payload);
|
||||
|
||||
export const updateAe = (studyId: string, aeId: string, payload: Record<string, any>) =>
|
||||
apiPatch(`/api/v1/studies/${studyId}/aes/${aeId}`, payload);
|
||||
@@ -0,0 +1,12 @@
|
||||
import { apiGet, apiPost } from "./axios";
|
||||
|
||||
export const fetchAttachments = (studyId: string, entityType: string, entityId: string) =>
|
||||
apiGet(`/api/v1/studies/${studyId}/${entityType}/${entityId}/attachments`);
|
||||
|
||||
export const uploadAttachment = (studyId: string, entityType: string, entityId: string, file: File) => {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
return apiPost(`/api/v1/studies/${studyId}/${entityType}/${entityId}/attachments`, formData, {
|
||||
headers: { "Content-Type": "multipart/form-data" },
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { apiGet, apiPost } from "./axios";
|
||||
|
||||
export const fetchComments = (studyId: string, entityType: string, entityId: string) =>
|
||||
apiGet(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments`);
|
||||
|
||||
export const createComment = (
|
||||
studyId: string,
|
||||
entityType: string,
|
||||
entityId: string,
|
||||
payload: Record<string, any>
|
||||
) => apiPost(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments`, payload);
|
||||
@@ -0,0 +1,11 @@
|
||||
import { apiGet, apiPost, apiPatch } from "./axios";
|
||||
import type { ApiListResponse } from "../types/api";
|
||||
|
||||
export const fetchIssues = (studyId: string, params?: Record<string, any>) =>
|
||||
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/issues/`, { params });
|
||||
|
||||
export const createIssue = (studyId: string, payload: Record<string, any>) =>
|
||||
apiPost(`/api/v1/studies/${studyId}/issues/`, payload);
|
||||
|
||||
export const updateIssue = (studyId: string, issueId: string, payload: Record<string, any>) =>
|
||||
apiPatch(`/api/v1/studies/${studyId}/issues/${issueId}`, payload);
|
||||
Reference in New Issue
Block a user