feat: nested department sections, attaching department sections in the user editor
This commit is contained in:
@@ -13,6 +13,7 @@ import type { DeleteDepartmentSectionResponse } from '../models/DeleteDepartment
|
||||
import type { DeleteUserRequest } from '../models/DeleteUserRequest';
|
||||
import type { DeleteUserResponse } from '../models/DeleteUserResponse';
|
||||
import type { GetAvailableUsersForDepartmentSectionResponse } from '../models/GetAvailableUsersForDepartmentSectionResponse';
|
||||
import type { GetDepartmentSectionsResponse } from '../models/GetDepartmentSectionsResponse';
|
||||
import type { GetDepartmentsResponse } from '../models/GetDepartmentsResponse';
|
||||
import type { UpdateDepartmentRequest } from '../models/UpdateDepartmentRequest';
|
||||
import type { UpdateDepartmentResponse } from '../models/UpdateDepartmentResponse';
|
||||
@@ -94,6 +95,17 @@ export class DepartmentService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Sections
|
||||
* @returns GetDepartmentSectionsResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getSections(): CancelablePromise<GetDepartmentSectionsResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'GET',
|
||||
url: '/department/section',
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create Section
|
||||
* @returns CreateDepartmentSectionResponse Successful Response
|
||||
|
||||
@@ -7,6 +7,8 @@ import type { CreateUserRequest } from '../models/CreateUserRequest';
|
||||
import type { CreateUserResponse } from '../models/CreateUserResponse';
|
||||
import type { GetAllUsersResponse } from '../models/GetAllUsersResponse';
|
||||
import type { GetManagersResponse } from '../models/GetManagersResponse';
|
||||
import type { UpdateUserDepartmentSectionsRequest } from '../models/UpdateUserDepartmentSectionsRequest';
|
||||
import type { UpdateUserDepartmentSectionsResponse } from '../models/UpdateUserDepartmentSectionsResponse';
|
||||
import type { UpdateUserRequest } from '../models/UpdateUserRequest';
|
||||
import type { UpdateUserResponse } from '../models/UpdateUserResponse';
|
||||
import type { UploadPassportImageResponse } from '../models/UploadPassportImageResponse';
|
||||
@@ -45,6 +47,31 @@ export class UserService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Update User Department Sections
|
||||
* @returns UpdateUserDepartmentSectionsResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static updateUserDepartmentSections({
|
||||
userId,
|
||||
requestBody,
|
||||
}: {
|
||||
userId: number,
|
||||
requestBody: UpdateUserDepartmentSectionsRequest,
|
||||
}): CancelablePromise<UpdateUserDepartmentSectionsResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/user/update/department-sections/{user_id}',
|
||||
path: {
|
||||
'user_id': userId,
|
||||
},
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Create
|
||||
* @returns CreateUserResponse Successful Response
|
||||
|
||||
Reference in New Issue
Block a user