hrms-api-org/src/interfaces/OrgMapping.ts
waruneeauy 3c9e3a1bb6
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m57s
fix: script org move draf to current save posMasterHistory
2026-02-12 10:38:16 +07:00

44 lines
1.1 KiB
TypeScript

/**
* Type definitions for organization mapping used in move-draft-to-current function
*/
/**
* Maps draft organization IDs to current organization IDs
* - byAncestorDNA: Maps ancestorDNA to current ID for lookup
* - byDraftId: Maps draft ID to current ID for position updates
*/
export interface OrgIdMapping {
byAncestorDNA: Map<string, string>;
byDraftId: Map<string, string>;
}
/**
* Contains mappings for all organization levels
*/
export interface AllOrgMappings {
orgRoot: OrgIdMapping;
orgChild1: OrgIdMapping;
orgChild2: OrgIdMapping;
orgChild3: OrgIdMapping;
orgChild4: OrgIdMapping;
}
export interface SavePosMasterHistory {
prefix: string | null;
firstName: string | null;
lastName: string | null;
position: string | null;
posType: string | null;
posLevel: string | null;
posExecutive: string | null;
profileId: string | null;
rootDnaId: string | null;
child1DnaId: string | null;
child2DnaId: string | null;
child3DnaId: string | null;
child4DnaId: string | null;
shortName: string | null;
posMasterNoPrefix: string | null;
posMasterNo: string | null;
posMasterNoSuffix: string | null;
}