diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index d4e5e238..445d332b 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3306,6 +3306,8 @@ export class CommandController extends Controller { positionSalaryAmount?: Double | null; mouthSalaryAmount?: Double | null; positionExecutive: string | null; + positionExecutiveField?: string | null; + positionArea?: string | null; positionType: string | null; positionLevel: string | null; isLeave: boolean; @@ -3623,6 +3625,8 @@ export class CommandController extends Controller { orgChild3?: string | null; orgChild4?: string | null; positionExecutive?: string | null; + positionExecutiveField?: string | null; + positionArea?: string | null; commandNo: string | null; commandYear: number | null; posNo: string | null; diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 3bd2ccd9..64cff0b8 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -9954,6 +9954,35 @@ export class ProfileController extends Controller { .find((x) => x.orgRevisionId == findRevision.id) ?.positions?.find((position) => position.positionIsSelected == true)?.posExecutive .posExecutiveName; + + const positionExecutiveField = + position == null || + item.current_holders + .find((x) => x.orgRevisionId == findRevision.id) + ?.positions?.find((position) => position.positionIsSelected == true)?.positionExecutiveField == + null || + item.current_holders + .find((x) => x.orgRevisionId == findRevision.id) + ?.positions?.find((position) => position.positionIsSelected == true)?.positionExecutiveField == null + ? null + : item.current_holders + .find((x) => x.orgRevisionId == findRevision.id) + ?.positions?.find((position) => position.positionIsSelected == true)?.positionExecutiveField; + + const positionArea = + position == null || + item.current_holders + .find((x) => x.orgRevisionId == findRevision.id) + ?.positions?.find((position) => position.positionIsSelected == true)?.positionArea == + null || + item.current_holders + .find((x) => x.orgRevisionId == findRevision.id) + ?.positions?.find((position) => position.positionIsSelected == true)?.positionArea == null + ? null + : item.current_holders + .find((x) => x.orgRevisionId == findRevision.id) + ?.positions?.find((position) => position.positionIsSelected == true)?.positionArea; + const posExecutiveId = position == null || position.posExecutive == null ? null : position.posExecutive.id; @@ -10071,6 +10100,8 @@ export class ProfileController extends Controller { position: item.position, posExecutiveId: posExecutiveId, posExecutiveName: posExecutive, + positionExecutiveField: positionExecutiveField, + positionArea: positionArea, node: node, nodeId: nodeId, nodeShortName: nodeShortName, diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index 6dd79359..d7bddca4 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -5553,6 +5553,8 @@ export class ProfileEmployeeController extends Controller { node: node, nodeId: nodeId, nodeShortName: nodeShortName, + positionExecutiveField: null, + positionArea: null, }; }); return new HttpSuccess(formattedData);