improvement: all clinic side ui components related to treatment types updated based on the new real world data.
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { apiClient } from './client';
|
||||
import type { TreatmentCatalogEntry } from '@/types/treatment-catalog';
|
||||
|
||||
export type TreatmentCatalogContext = 'appointment' | 'treatment';
|
||||
|
||||
export const treatmentCatalogApi = {
|
||||
list: async (): Promise<{ success: boolean; data: TreatmentCatalogEntry[] }> => {
|
||||
const response = await apiClient.get('/treatment-catalog');
|
||||
list: async (
|
||||
context?: TreatmentCatalogContext,
|
||||
): Promise<{ success: boolean; data: TreatmentCatalogEntry[] }> => {
|
||||
const response = await apiClient.get('/treatment-catalog', {
|
||||
params: context ? { context } : undefined,
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user