|
@@ -8,7 +8,11 @@ import {
|
|
} from '@/states/patient/register/SelectionTypeSlice';
|
|
} from '@/states/patient/register/SelectionTypeSlice';
|
|
import { setCurrentBodyPart } from '../../bodyPartSlice';
|
|
import { setCurrentBodyPart } from '../../bodyPartSlice';
|
|
import { fetchProcedures, Procedure } from '@/API/patient/procedureActions';
|
|
import { fetchProcedures, Procedure } from '@/API/patient/procedureActions';
|
|
-import { fetchViews, View } from '@/API/patient/viewActions';
|
|
|
|
|
|
+import {
|
|
|
|
+ fetchViews,
|
|
|
|
+ View,
|
|
|
|
+ fetchViewsByProcedureId as fetchViewsByProcedureIdAction,
|
|
|
|
+} from '@/API/patient/viewActions';
|
|
export type { Procedure, View };
|
|
export type { Procedure, View };
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
|
@@ -76,8 +80,8 @@ export const fetchViewsByProcedureId = createAsyncThunk(
|
|
'data/fetchViewsByProcedureId',
|
|
'data/fetchViewsByProcedureId',
|
|
async (procedureId: string, { rejectWithValue }) => {
|
|
async (procedureId: string, { rejectWithValue }) => {
|
|
try {
|
|
try {
|
|
- const response = await fetchViews(null, null, true, procedureId);
|
|
|
|
- return response.data.views;
|
|
|
|
|
|
+ const views = await fetchViewsByProcedureIdAction(procedureId);
|
|
|
|
+ return views;
|
|
} catch (error) {
|
|
} catch (error) {
|
|
return rejectWithValue(error.message);
|
|
return rejectWithValue(error.message);
|
|
}
|
|
}
|