mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-29 15:18:12 +00:00
feat: change usermanagement from git submodule to componenet based
This commit is contained in:
@@ -3,8 +3,6 @@ import type {
|
||||
Department,
|
||||
Profession,
|
||||
ListResponse,
|
||||
CreateDepartmentPayload,
|
||||
UpdateDepartmentPayload,
|
||||
CreateProfessionPayload,
|
||||
UpdateProfessionPayload,
|
||||
} from '../types/configuration';
|
||||
@@ -15,22 +13,6 @@ const configurationApi = baseApi.injectEndpoints({
|
||||
query: () => '/departments',
|
||||
providesTags: ['Api'],
|
||||
}),
|
||||
createDepartment: builder.mutation<Department, CreateDepartmentPayload>({
|
||||
query: (body) => ({ url: '/departments', method: 'POST', body }),
|
||||
invalidatesTags: ['Api'],
|
||||
}),
|
||||
updateDepartment: builder.mutation<Department, UpdateDepartmentPayload>({
|
||||
query: ({ id, ...body }) => ({
|
||||
url: `/departments/${id}`,
|
||||
method: 'PUT',
|
||||
body,
|
||||
}),
|
||||
invalidatesTags: ['Api'],
|
||||
}),
|
||||
deleteDepartment: builder.mutation<void, string>({
|
||||
query: (id) => ({ url: `/departments/${id}`, method: 'DELETE' }),
|
||||
invalidatesTags: ['Api'],
|
||||
}),
|
||||
|
||||
getProfessions: builder.query<ListResponse<Profession>, void>({
|
||||
query: () => '/professions',
|
||||
@@ -58,9 +40,6 @@ const configurationApi = baseApi.injectEndpoints({
|
||||
|
||||
export const {
|
||||
useGetDepartmentsQuery,
|
||||
useCreateDepartmentMutation,
|
||||
useUpdateDepartmentMutation,
|
||||
useDeleteDepartmentMutation,
|
||||
useGetProfessionsQuery,
|
||||
useCreateProfessionMutation,
|
||||
useUpdateProfessionMutation,
|
||||
|
||||
Reference in New Issue
Block a user