impl get position over detail divions

wip: detail division

for entry new division position

finish v1 divison-position
This commit is contained in:
Khafid Prayoga
2025-10-24 12:48:05 +07:00
parent 1042fd4923
commit df27262bd1
13 changed files with 675 additions and 6 deletions
+3 -1
View File
@@ -1,11 +1,13 @@
import { type Base, genBase } from './_base'
import type { Employee } from './employee'
export interface DivisionPosition extends Base {
code: string
name: string
headStatus?: boolean
division_id: number
employee_id?: number
employee?: Employee | null
}
export function genDivisionPosition(): DivisionPosition {
+5 -2
View File
@@ -1,10 +1,13 @@
import { type Base, genBase } from "./_base"
import { type Base, genBase } from './_base'
import type { DivisionPosition } from './division-position'
export interface Division extends Base {
code: string
name: string
parent_id?: number | null
childrens?: Division[] | null
// preload
divisionPosition?: DivisionPosition[] | null
}
export function genDivision(): Division {
+20
View File
@@ -0,0 +1,20 @@
import { type Base, genBase } from './_base'
export interface InstallationPosition extends Base {
installation_id: number
code: string
name: string
headStatus?: boolean
employee_id?: number
}
export function genInstallationPosition(): InstallationPosition {
return {
...genBase(),
installation_id: 0,
code: '',
name: '',
headStatus: false,
employee_id: 0,
}
}
+20
View File
@@ -0,0 +1,20 @@
import { type Base, genBase } from './_base'
export interface SpecialistPosition extends Base {
specialist_id: number
code: string
name: string
headStatus?: boolean
employee_id?: number
}
export function genSpecialistPosition(): SpecialistPosition {
return {
...genBase(),
specialist_id: 0,
code: '',
name: '',
headStatus: false,
employee_id: 0,
}
}
+20
View File
@@ -0,0 +1,20 @@
import { type Base, genBase } from './_base'
export interface SubSpecialistPosition extends Base {
subspecialist_id: number
code: string
name: string
headStatus?: boolean
employee_id?: number
}
export function genSubSpecialistPosition(): SubSpecialistPosition {
return {
...genBase(),
subspecialist_id: 0,
code: '',
name: '',
headStatus: false,
employee_id: 0,
}
}
+20
View File
@@ -0,0 +1,20 @@
import { type Base, genBase } from './_base'
export interface UnitPosition extends Base {
unit_id: number
code: string
name: string
headStatus?: boolean
employee_id?: number
}
export function genUnitPosition(): UnitPosition {
return {
...genBase(),
unit_id: 0,
code: '',
name: '',
headStatus: false,
employee_id: 0,
}
}