29 lines
622 B
TypeScript
29 lines
622 B
TypeScript
import apiService from './api.service'
|
|
|
|
export interface OrgChartUserDto {
|
|
id: string
|
|
fullName: string
|
|
email: string
|
|
userName: string
|
|
}
|
|
|
|
export interface OrgChartNodeDto {
|
|
id: string
|
|
name: string
|
|
parentId?: string
|
|
departmentId?: string
|
|
departmentName?: string
|
|
users: OrgChartUserDto[]
|
|
}
|
|
|
|
export const getOrgChartDepartments = () =>
|
|
apiService.fetchData<OrgChartNodeDto[]>({
|
|
method: 'GET',
|
|
url: '/api/app/org-chart/departments',
|
|
})
|
|
|
|
export const getOrgChartJobPositions = () =>
|
|
apiService.fetchData<OrgChartNodeDto[]>({
|
|
method: 'GET',
|
|
url: '/api/app/org-chart/job-positions',
|
|
})
|