diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 3daa36aa..acd9829a 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -2595,8 +2595,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, @@ -2646,6 +2651,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 33370f04..1918c3d7 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -1823,8 +1823,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, @@ -1876,6 +1881,7 @@ export class ProfileEmployeeController extends Controller { calculateRetireDate(item.current_holder.birthDate).getFullYear() != body.year ? false : true, + isSpecial: false, }; });