sozsoft-platform/ui/src/services/orgChart.service.ts

30 lines
622 B
TypeScript
Raw Normal View History

2026-05-04 19:50:21 +00:00
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',
})