improvement: users can now comment on a case and it's details and have an option to make it visible for clinics too.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { apiClient } from './client';
|
||||
import type { LabCaseComment } from '@/types/cases';
|
||||
import type {
|
||||
LabCaseResponse,
|
||||
LinkedOrganizationOption,
|
||||
@@ -82,6 +83,21 @@ export const treatmentsApi = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
listLabCaseComments: async (
|
||||
labCaseId: string,
|
||||
): Promise<{ success: boolean; data: LabCaseComment[] }> => {
|
||||
const response = await apiClient.get(`/treatments/lab-cases/${labCaseId}/comments`);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
addLabCaseComment: async (
|
||||
labCaseId: string,
|
||||
payload: { body: string },
|
||||
): Promise<{ success: boolean; data: LabCaseComment }> => {
|
||||
const response = await apiClient.post(`/treatments/lab-cases/${labCaseId}/comments`, payload);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
getAttachmentFileBlob: async (attachmentId: string): Promise<Blob> => {
|
||||
const response = await apiClient.get(`/treatments/attachments/${attachmentId}/file`, {
|
||||
responseType: 'blob',
|
||||
|
||||
Reference in New Issue
Block a user