sozsoft-platform/ui/src/services/orgChart.service.ts
2026-05-04 22:50:21 +03:00

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',
})