From bc49bb1e9004dda25e40467ec09d59ace32167ad Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 28 May 2024 14:17:45 +0700 Subject: [PATCH] no message --- src/controllers/ProfileController.ts | 6 ++++++ src/controllers/ProfileEmployeeController.ts | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index e722cb21..f51c1989 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -2578,8 +2578,13 @@ export class ProfileController extends Controller { datePeriodStart.getMonth() - 6, ), ); + const specialPosition = item.positions.find( + (position) => position.positionIsSelected === true, + ); + const isSpecial = specialPosition ? specialPosition.isSpecial : null; return { + profileId: item.current_holder.id, prefix: item.current_holder.prefix, rank: item.current_holder.rank, firstName: item.current_holder.firstName, @@ -2629,6 +2634,7 @@ export class ProfileController extends Controller { calculateRetireDate(item.current_holder.birthDate).getFullYear() != body.year ? false : true, + isSpecial: isSpecial, }; }); diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index b9bf56b8..db62cf49 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -1812,8 +1812,13 @@ export class ProfileEmployeeController extends Controller { datePeriodStart.getMonth() - 6, ), ); + // const specialPosition = item.positions.find( + // (position) => position.positionIsSelected === true, + // ); + // const isSpecial = specialPosition ? specialPosition.isSpecial : null; return { + profileId: item.current_holder.id, salaryLevel: item.current_holder.salaryLevel, group: item.current_holder.group, rank: item.current_holder.rank, @@ -1865,6 +1870,7 @@ export class ProfileEmployeeController extends Controller { calculateRetireDate(item.current_holder.birthDate).getFullYear() != body.year ? false : true, + isSpecial: false, }; });