diff --git a/src/controllers/OrganizationUnauthorizeController.ts b/src/controllers/OrganizationUnauthorizeController.ts index a0521db2..241c4420 100644 --- a/src/controllers/OrganizationUnauthorizeController.ts +++ b/src/controllers/OrganizationUnauthorizeController.ts @@ -197,7 +197,10 @@ export class OrganizationUnauthorizeController extends Controller { datePeriodStart.getMonth() - 6, ), ); + const specialPosition = item.positions.find(position => position.positionIsSelected === true); + const isSpecial = specialPosition ? specialPosition.isSpecial : null; return { + id: item.id, prefix: item.current_holder.prefix, firstName: item.current_holder.firstName, lastName: item.current_holder.lastName, @@ -245,7 +248,7 @@ export class OrganizationUnauthorizeController extends Controller { calculateRetireDate(item.current_holder.birthDate).getFullYear() != body.year ? false : true, - isSpecial: false, + isSpecial: isSpecial }; }); return new HttpSuccess({ data: formattedData, total: total }); @@ -399,6 +402,7 @@ export class OrganizationUnauthorizeController extends Controller { datePeriodStart.getMonth() - 6, ), ); + return { salaryLevel: item.current_holder.salaryLevel, group: item.current_holder.group, @@ -450,7 +454,6 @@ export class OrganizationUnauthorizeController extends Controller { calculateRetireDate(item.current_holder.birthDate).getFullYear() != body.year ? false : true, - isSpecial: false, }; }); return new HttpSuccess({ data: formattedData, total: total });