From 648baabaf14bc6ba0022b68cb5923a60fd2dc5eb Mon Sep 17 00:00:00 2001 From: Bright Date: Wed, 14 May 2025 18:11:23 +0700 Subject: [PATCH] add fields --- .../OrganizationDotnetController.ts | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/controllers/OrganizationDotnetController.ts b/src/controllers/OrganizationDotnetController.ts index 05e9f697..feb87bbd 100644 --- a/src/controllers/OrganizationDotnetController.ts +++ b/src/controllers/OrganizationDotnetController.ts @@ -2369,6 +2369,8 @@ export class OrganizationDotnetController extends Controller { "profileSalary", "profileInsignias", "profileInsignias.insignia", + "profileDisciplines", + "profileAssessments", "current_holders", "current_holders.orgRevision", "current_holders.orgRoot", @@ -2564,6 +2566,16 @@ export class OrganizationDotnetController extends Controller { x.orgRevision?.orgRevisionIsCurrent == true, )?.orgChild4?.ancestorDNA ?? null, posNo: shortName ?? "", + markDiscipline: profile.profileDisciplines.length > 0 + ? true + : false, + markLeave: false, + markRate: profile.profileAssessments.length > 0 + ? true + : false, + markInsignia: profile.profileInsignias.length > 0 + ? true + : false, }; }); @@ -2739,6 +2751,8 @@ export class OrganizationDotnetController extends Controller { "profileSalary", "profileInsignias", "profileInsignias.insignia", + "profileDisciplines", + "profileAssessments", "current_holders", "current_holders.orgRevision", "current_holders.orgRoot", @@ -2832,7 +2846,9 @@ export class OrganizationDotnetController extends Controller { currentZipCode: profile.currentZipCode, // dutyTimeId: profile.dutyTimeId, // dutyTimeEffectiveDate: profile.dutyTimeEffectiveDate, - posLevel: profile.posLevel?.posLevelName ?? "", + posLevel: profile.posType?.posTypeShortName && profile.posLevel?.posLevelName + ? `${profile.posType.posTypeShortName} ${profile.posLevel.posLevelName}` + : profile.posType?.posTypeShortName || profile.posLevel?.posLevelName || "", posType: profile.posType?.posTypeName ?? "", profileSalary: profile.profileSalary.map((x) => { return { ...x, date: x.commandDateAffect ?? new Date() }; @@ -2935,6 +2951,16 @@ export class OrganizationDotnetController extends Controller { x.orgRevision?.orgRevisionIsCurrent == true, )?.orgChild4?.ancestorDNA ?? null, posNo: shortName ?? "", + markDiscipline: profile.profileDisciplines.length > 0 + ? true + : false, + markLeave: false, + markRate: profile.profileAssessments.length > 0 + ? true + : false, + markInsignia: profile.profileInsignias.length > 0 + ? true + : false, }; });