isSpecial

This commit is contained in:
AdisakKanthawilang 2024-04-02 15:57:56 +07:00
parent 9d77bc44c4
commit a01c657512

View file

@ -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 });